/* Nearly Perfect Rooms - Custom Styles
 * These styles supplement Tailwind CSS
 */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
:focus {
    outline: 2px solid #120BA4;
    outline-offset: 2px;
}

/* Remove focus outline for mouse users, keep for keyboard */
:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid #120BA4;
    outline-offset: 2px;
}

/* Smooth transitions for links and buttons */
a,
button {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Prose styles for legal pages */
.prose h2 {
    scroll-margin-top: 4rem;
}

.prose a {
    color: #120BA4;
    text-decoration: none;
}

.prose a:hover {
    text-decoration: underline;
}

/* Loading state for HTMX */
.htmx-request {
    opacity: 0.7;
    cursor: wait;
}

/* Hide loading indicator by default, show during HTMX request */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

/* Form loading state - disable inputs during submission */
.htmx-request input,
.htmx-request button {
    pointer-events: none;
}

.htmx-request button {
    opacity: 0.8;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #120BA4;
    color: white;
    padding: 8px 16px;
    z-index: 100;
    text-decoration: none;
}

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

/* FAQ Accordion styles */
.faq-question {
    cursor: pointer;
    user-select: none;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-answer.open {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem 1.5rem;
}

.faq-chevron {
    transition: transform 0.3s ease;
}

.faq-chevron.open {
    transform: rotate(180deg);
}
