/* assets/css/evaluation-form.css */
:root {
    --eva-primary: #0a1628;
    /* Navy */
    --eva-accent: #c9a74a;
    /* Gold */
    --eva-accent-light: rgba(201, 167, 74, 0.1);
}

body.theme-spain {
    --eva-primary: #C0392B;
    /* Rojo España */
    --eva-accent: #f1c40f;
    /* Amarillo/Dorado */
    --eva-accent-light: rgba(241, 196, 15, 0.1);
}

.eva-header-bg {
    background-color: var(--eva-primary);
    transition: background-color 0.4s ease;
}

.eva-accent-bg {
    background-color: var(--eva-accent);
}

.eva-accent-text {
    color: var(--eva-accent);
}

/* Radio Card Styles */
.eva-radio-card {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    background: white;
    min-height: 3.5rem;
}

.eva-radio-card:hover {
    border-color: var(--eva-accent);
    background-color: var(--eva-accent-light);
    transform: translateY(-1px);
}

.eva-radio-card input[type="radio"],
.eva-radio-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.eva-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: white;
}

.eva-radio-card input[type="checkbox"]~.eva-indicator {
    border-radius: 0.25rem;
}

.eva-radio-card input:checked~.eva-indicator {
    border-color: var(--eva-accent);
}

.eva-radio-card input[type="radio"]:checked~.eva-indicator::after {
    content: '';
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background-color: var(--eva-accent);
}

.eva-radio-card input[type="checkbox"]:checked~.eva-indicator::after {
    content: '✓';
    color: var(--eva-accent);
    font-size: 0.875rem;
    font-weight: bold;
}

.eva-radio-card:has(input:checked) {
    border-color: var(--eva-accent);
    background-color: var(--eva-accent-light);
}

.eva-card-content {
    display: flex;
    flex-direction: column;
}

.eva-card-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    line-height: 1.25;
}

/* Custom Input Styles */
.eva-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.6rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
    transition: all 0.2s;
    background-color: #fcfdfe;
}

.eva-input:focus {
    outline: none;
    border-color: var(--eva-primary);
    background-color: white;
}

.eva-input::placeholder {
    color: #94a3b8;
}

/* Textarea tweaks */
textarea.eva-input {
    resize: none;
}

/* Animations */
.eva-step-enter {
    animation: evaFadeInUp 0.4s ease forwards;
}

@keyframes evaFadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success Checkmark Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 5;
    stroke: var(--eva-accent);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--eva-accent);
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
    margin: 0 auto 1.5rem;
}

.success-checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 5;
    stroke-miterlimit: 10;
    stroke: var(--eva-accent);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: #fff;
    stroke-width: 5;
    stroke-linecap: round;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 100px var(--eva-accent);
        background-color: var(--eva-accent);
    }
}

/* Ensure modal stays on top of everything */
#evaluation-modal {
    z-index: 999999 !important;
}

/* Modal Content Scrollbar Tweaks */
#modal-body::-webkit-scrollbar {
    width: 6px;
}

#modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

#modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    #evaluation-modal {
        padding: 0 !important;
    }

    #evaluation-modal-content {
        margin: 0 !important;
        height: 100% !important;
        height: 100dvh !important;
        /* Use modern viewport units */
        max-height: 100% !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        width: 100% !important;
        display: flex;
        flex-direction: column;
    }

    #modal-header {
        border-radius: 0 !important;
        padding-top: calc(1rem + env(safe-area-inset-top, 0px)) !important;
        flex-shrink: 0;
    }

    #modal-body {
        padding: 1rem !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        flex-grow: 1;
    }

    /* Prevent body from scrolling when modal is open - handled via global class if needed, 
       but here we ensure the modal itself is robust */
    body.modal-open {
        overflow: hidden !important;
        position: fixed;
        width: 100%;
    }

    .eva-radio-card {
        padding: 0.75rem !important;
    }

    #modal-footer {
        padding: 1rem !important;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    /* Make checkbox easier to tap on mobile */
    .eva-terms-wrapper {
        font-size: 13px !important;
        align-items: center !important;
    }

    .eva-terms-wrapper input[type="checkbox"] {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
}