/**
 * RedirMe Custom Styles
 *
 * Additional styles beyond TailwindCSS for the RedirMe web package.
 * TailwindCSS is loaded via CDN in production.
 */

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  z-index: 100;
  padding: 8px 16px;
  background: #2563eb;
  color: white;
  text-decoration: none;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  top: 0;
}

/* Primary Button Style */
.btn-primary {
  display: inline-block;
  background-color: #2563eb;
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 200ms;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

/* Focus Styles for Keyboard Navigation */
*:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Ensure all interactive elements are keyboard accessible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Loading State */
.loading {
  opacity: 0.6;
  cursor: wait;
}

/* Success Message */
.success-message {
  background-color: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

/* Error Message */
.error-message {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

/* Availability Indicator */
.available {
  color: #16a34a;
  font-weight: 600;
}

.unavailable {
  color: #dc2626;
  font-weight: 600;
}

/* Smooth Transitions */
a,
button {
  transition: all 200ms ease-in-out;
}

/* Responsive Typography */
@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

/* Print Styles */
@media print {
  .skip-link,
  header,
  footer,
  #user-nav {
    display: none;
  }
}

/* Animation for Result Display */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 300ms ease-out;
}

/* Copy Button Feedback */
.copied {
  background-color: #16a34a !important;
}

.copied::after {
  content: " ✓ Copied!";
  margin-left: 0.5rem;
}

/* Details/Summary Styling */
details summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::before {
  content: "▶ ";
  display: inline-block;
  transition: transform 200ms;
}

details[open] summary::before {
  transform: rotate(90deg);
}

/* Prose Styles for Terms/Privacy Pages */
.prose {
  color: #374151;
  line-height: 1.75;
}

.prose h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
}

.prose ul {
  margin-bottom: 1rem;
}

.prose a {
  color: #2563eb;
  text-decoration: underline;
}

.prose a:hover {
  color: #1d4ed8;
}

/* Mobile Menu Toggle (if needed in future) */
@media (max-width: 768px) {
  .mobile-menu-hidden {
    display: none;
  }
}
