/* Feedback Form Styles */

/* Allow body to grow with content */
html, body {
    overflow-x: hidden;
}

body {
    overscroll-behavior: none;
    min-height: 100vh;
}

/* Carousel Background */
.carousel-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.carousel-background .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-background .carousel-slide.active {
    opacity: 1;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Honeypot */
.honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Form Container */
.feedback-form-container {
    position: fixed;
    top: 4.5rem; /* Below header */
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 1;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
    .feedback-form-container {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        padding: 2.5rem 2rem;
        justify-content: flex-start;
        max-height: calc(100vh - 7.5rem);
        overflow-y: auto;
        background: rgba(10, 10, 10, 0.85);
        border-radius: 0;
        margin-top: 5.5rem; /* Account for fixed header */
        margin-bottom: 2rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

@media (min-width: 640px) {
    .form-header h1 {
        font-size: 2.25rem;
    }
}

.intro-text {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
    font-weight: 400;
}

.time-estimate {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

/* Progress Indicator */
.progress-container {
    margin-bottom: 2rem;
}

.progress-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    text-align: center;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ffffff;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Form Steps */
.form-step {
    border: none;
    padding: 0;
    margin: 0;
}

/* Reset nested fieldset styles */
.feedback-form-container fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.conditional-field {
    padding-left: 1rem;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
    margin-top: -0.5rem;
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Labels */
.feedback-form-container label,
.feedback-form-container legend {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.required::after {
    content: ' *';
    color: #ff6b6b;
}

/* Text Inputs */
.feedback-form-container input[type="text"],
.feedback-form-container input[type="email"],
.feedback-form-container input[type="tel"],
.feedback-form-container textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.feedback-form-container input[type="text"]:focus,
.feedback-form-container input[type="email"]:focus,
.feedback-form-container input[type="tel"]:focus,
.feedback-form-container textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.feedback-form-container input[type="text"].error,
.feedback-form-container input[type="email"].error,
.feedback-form-container input[type="tel"].error,
.feedback-form-container textarea.error {
    border-color: #ff6b6b;
}

.feedback-form-container input[type="text"].error:focus,
.feedback-form-container input[type="email"].error:focus,
.feedback-form-container input[type="tel"].error:focus,
.feedback-form-container textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.feedback-form-container textarea {
    resize: vertical;
    min-height: 100px;
}

/* Hint Text */
.hint-text {
    display: block;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.375rem;
    font-style: italic;
}

/* Error Messages */
.error-message {
    display: block;
    font-size: 0.8125rem;
    color: #ff6b6b;
    margin-top: 0.375rem;
    font-weight: 500;
    min-height: 1.2em;
}

.submit-error {
    padding: 1rem;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    border-radius: 0;
    color: #ff6b6b;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Radio Groups */
.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    transition: all 0.2s ease;
    font-weight: 400;
    margin-bottom: 0;
}

.radio-label:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.radio-label:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.radio-label input[type="radio"] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: #ffffff;
    cursor: pointer;
}

.radio-label span {
    font-size: 0.9375rem;
    color: #ffffff;
}

/* Rating Group */
.rating-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: center;
}

@media (max-width: 480px) {
    .rating-group {
        flex-direction: column;
    }
}

.rating-label {
    flex: 1;
    min-width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    padding: 1rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    transition: all 0.2s ease;
    text-align: center;
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .rating-label {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .rating-label .rating-number {
        flex-shrink: 0;
    }

    .rating-label .rating-text {
        text-align: left;
        justify-content: flex-start;
    }
}

.rating-label:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.rating-label:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.rating-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rating-label input[type="radio"]:checked + .rating-number {
    background: #ffffff;
    color: #0a0a0a;
}

.rating-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.2s ease;
    color: #ffffff;
}

.rating-text {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    line-height: 1.2;
    min-height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .rating-text {
        font-size: 0.875rem;
        min-height: auto;
    }
}

/* NPS Group */
.nps-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.nps-buttons {
    display: flex;
    gap: 0.125rem;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
}

.nps-button {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: calc((100% - 1.25rem) / 11);
    min-width: 1.75rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.nps-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.nps-button:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.nps-button input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.nps-button input[type="radio"]:checked + span {
    background: #ffffff;
    color: #0a0a0a;
    border-radius: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nps-button span {
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #ffffff;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nps-label-left,
.nps-label-right {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .nps-group {
        flex-direction: row;
        gap: 0.75rem;
    }

    .nps-button {
        width: 2.5rem;
        height: 2.5rem;
    }

    .nps-button span {
        font-size: 0.875rem;
    }

    .nps-label-left,
    .nps-label-right {
        font-size: 0.75rem;
    }
}

/* Form Navigation */
.form-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.feedback-form-container .btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-height: 48px;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feedback-form-container .btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.feedback-form-container .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.feedback-form-container .btn-primary {
    background: #ffffff;
    color: #0a0a0a;
    border: none;
}

.feedback-form-container .btn-primary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

.feedback-form-container .btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.feedback-form-container .btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feedback-form-container .btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Thank You Message */
.thank-you-message {
    text-align: center;
    padding: 3rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .thank-you-message {
        padding: 2rem 1.5rem;
    }
}

.thank-you-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #51cf66;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.thank-you-icon svg {
    width: 40px;
    height: 40px;
    color: #0a0a0a;
}

.thank-you-message h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
}

.thank-you-message p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 400px;
    line-height: 1.6;
}

.thank-you-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
}

.thank-you-links .btn {
    flex: none;
    width: 100%;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
    .thank-you-links {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }

    .thank-you-links .btn {
        width: auto;
        flex: 0 0 auto;
    }
}

/* Focus visible for keyboard navigation */
.feedback-form-container *:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.feedback-form-container input[type="radio"]:focus-visible + span,
.feedback-form-container input[type="radio"]:focus-visible ~ .rating-number {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}
