/* Custom styles for survey modal */

:root {
    --survey-overlay-color: rgba(5, 12, 32, 0.65);
    --survey-surface-color: #ffffff;
    --survey-primary-color: #e10514;
    --survey-border-color: #e6e6e6;
    --survey-text-color: #1f1f1f;
}

.survey-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--survey-overlay-color);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.survey-modal--visible {
    opacity: 1;
    visibility: visible;
}

.survey-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 540px;
    background: var(--survey-surface-color);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(14, 30, 69, 0.25);
    padding: 32px;
    color: var(--survey-text-color);
    overflow: hidden;
}

.survey-modal__backdrop {
    position: absolute;
    inset: 0;
}

.survey-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #8a8a8a;
}

.survey-modal__title {
    font-size: 24px;
    line-height: 1.3;
    font-weight: 600;
    margin-bottom: 12px;
}

.survey-modal__subtitle {
    margin: 0 0 24px;
    font-size: 15px;
    color: #595959;
    line-height: 1.5;
}

.survey-question {
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.survey-rating {
    display: grid;
    grid-template-columns: repeat(5, minmax(52px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.survey-rating__option {
    position: relative;
}

.survey-rating__option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.survey-rating__option label {
    border: 1px solid var(--survey-border-color);
    border-radius: 12px;
    text-align: center;
    padding: 10px 0;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.survey-rating__option input:focus + label,
.survey-rating__option label:hover {
    border-color: var(--survey-primary-color);
    color: var(--survey-primary-color);
}

.survey-rating__option input:checked + label {
    background: var(--survey-primary-color);
    color: #fff;
    border-color: var(--survey-primary-color);
    box-shadow: 0 12px 20px rgba(225, 5, 20, 0.22);
}

.survey-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.survey-channel {
    border: 1px solid var(--survey-border-color);
    border-radius: 12px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.survey-channel span {
    display: block;
}

.survey-channel input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.survey-channel input:checked + span {
    color: var(--survey-primary-color);
}

.survey-channel:has(input:checked) {
    border-color: var(--survey-primary-color);
    background: rgba(225, 5, 20, 0.06);
    box-shadow: 0 12px 20px rgba(225, 5, 20, 0.12);
}

.survey-input,
.survey-textarea {
    width: 100%;
    border: 1px solid var(--survey-border-color);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.survey-input:focus,
.survey-textarea:focus {
    outline: none;
    border-color: var(--survey-primary-color);
    box-shadow: 0 0 0 2px rgba(225, 5, 20, 0.15);
}

.survey-textarea {
    min-height: 96px;
    resize: vertical;
}

.survey-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.survey-btn {
    flex: 1;
    min-width: 140px;
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.survey-btn--primary {
    background: var(--survey-primary-color);
    color: #fff;
    box-shadow: 0 16px 25px rgba(225, 5, 20, 0.25);
}

.survey-btn--primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.survey-btn--ghost {
    background: transparent;
    color: var(--survey-text-color);
    border: 1px solid var(--survey-border-color);
}

.survey-modal__success {
    text-align: center;
    padding: 20px 0 8px;
}

.survey-modal__success h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

.survey-modal__success p {
    margin: 0;
    color: #5a5a5a;
}

.survey-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
    padding: 12px 18px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--survey-primary-color);
    color: var(--survey-primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.survey-continue:hover {
    background: var(--survey-primary-color);
    color: #fff;
}

.survey-step {
    display: none;
}

.survey-step.is-active {
    display: block;
    animation: surveyFade 0.25s ease;
}

.survey-step__title {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 16px;
}

.survey-options {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.survey-option {
    position: relative;
    border: 1px solid var(--survey-border-color);
    border-radius: 12px;
    padding: 14px 16px;
    font-weight: 600;
    cursor: pointer;
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.survey-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.survey-option span {
    display: block;
}

.survey-option:has(input:checked) {
    border-color: var(--survey-primary-color);
    background: rgba(225, 5, 20, 0.06);
    box-shadow: 0 12px 20px rgba(225, 5, 20, 0.12);
    color: var(--survey-primary-color);
}

.survey-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
}

.survey-btn--hidden {
    visibility: hidden;
    pointer-events: none;
}

.survey-stars {
    display: flex;
    gap: 8px;
    font-size: 28px;
    margin: 16px 0;
}

.survey-stars input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.survey-stars label {
    cursor: pointer;
    color: #c7c7c7;
    transition: color 0.2s ease;
}

.survey-stars label.is-filled {
    color: var(--survey-primary-color);
    text-shadow: 0 6px 12px rgba(225, 5, 20, 0.25);
}

.survey-stars label:hover,
.survey-stars label:focus {
    color: var(--survey-primary-color);
}

.survey-step-helper {
    font-size: 14px;
    color: #6c6c6c;
    margin-top: -4px;
    margin-bottom: 18px;
}

.survey-progress-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
}

.survey-progress-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d1d1;
}

.survey-progress-dots span.is-active {
    background: var(--survey-primary-color);
}

@keyframes surveyFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 640px) {
    .survey-modal {
        padding: 12px;
    }

    .survey-modal__dialog {
        padding: 24px 20px 28px;
    }

    .survey-rating {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .survey-actions {
        flex-direction: column;
    }
}

body.survey-modal-open {
    overflow: hidden;
}

