/* CIFRAAT Enrollment Modal Styles */

.cifraat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    animation: cifraatFadeIn 0.3s forwards;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 20px;
    box-sizing: border-box;
}

@keyframes cifraatFadeIn {
    to { opacity: 1; }
}

.cifraat-modal-box {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 32px 32px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    animation: cifraatSlideUp 0.35s 0.1s forwards;
    opacity: 0;
    box-sizing: border-box;
}

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

.cifraat-modal-box--success {
    border-top: 4px solid #22c55e;
}

.cifraat-modal-box--error {
    border-top: 4px solid #ef4444;
}

.cifraat-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

.cifraat-modal-icon--success {
    background: #dcfce7;
    color: #16a34a;
}

.cifraat-modal-icon--error {
    background: #fee2e2;
    color: #dc2626;
}

.cifraat-modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a1a1a;
    line-height: 1.3;
}

.cifraat-modal-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px;
    line-height: 1.5;
}

.cifraat-modal-field {
    margin-bottom: 24px;
    text-align: left;
}

.cifraat-modal-field input[type="tel"] {
    width: 100%;
    padding: 14px 16px 14px 58px;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: #fafafa;
}

.cifraat-modal-field input[type="tel"]:focus {
    border-color: #316b4e;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(49, 107, 78, 0.1);
}

.cifraat-modal-field .iti {
    width: 100%;
}

.cifraat-modal-field .iti__flag-container {
    padding: 2px;
}

.cifraat-modal-field .iti__selected-flag {
    border-radius: 8px 0 0 8px;
    padding: 0 8px 0 12px;
    background: transparent;
}

.cifraat-modal-field .iti__selected-dial-code {
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    color: #374151;
    margin-left: 4px;
}

/* Emoji flag overrides — replaces blurry sprite flags */
.cifraat-modal-field .iti__flag {
    background-image: none !important;
    width: 22px !important;
    height: 16px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.cifraat-modal-field .iti__flag-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    margin-right: 8px;
}

.cifraat-modal-field .iti__country-list {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    max-height: 280px;
}

.cifraat-modal-field .iti__country {
    padding: 10px 16px;
    transition: background 0.15s;
}

.cifraat-modal-field .iti__country:hover,
.cifraat-modal-field .iti__country.iti__highlight {
    background: #f3f4f6;
}

.cifraat-modal-field .iti__country-name {
    color: #374151;
}

.cifraat-modal-field .iti__dial-code {
    color: #9ca3af;
}

.cifraat-modal-error {
    display: none;
    color: #dc2626;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    margin-top: 8px;
    padding-left: 4px;
}

.cifraat-modal-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: #316b4e;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.cifraat-modal-submit:hover {
    background: #285a40;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(49, 107, 78, 0.3);
}

.cifraat-modal-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(49, 107, 78, 0.2);
}

.cifraat-modal-submit__title {
    display: inline-block;
}

.cifraat-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .cifraat-modal-box {
    position: relative;
        padding: 32px 24px 24px;
        border-radius: 14px;
    }

    .cifraat-modal-title {
        font-size: 18px;
    }

    .cifraat-modal-field input[type="tel"] {
        padding: 12px 14px 12px 54px;
        font-size: 15px;
    }

    .cifraat-modal-submit {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Registration form phone field inside auth modal */
.cifraat-register-phone-field .iti {
    width: 100%;
}

.cifraat-register-phone-field .iti__flag-container {
    padding: 2px;
}

.cifraat-register-phone-field .iti__selected-flag {
    border-radius: 8px 0 0 8px;
    padding: 0 8px 0 12px;
    background: transparent;
}

.cifraat-register-phone-field .cifraat-modal-error {
    display: none;
    color: #dc2626;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    margin-top: 6px;
    padding-left: 4px;
}

/* Enrollment Options Modal */
.cifraat-modal-box--enrollment {
    padding: 36px 28px 28px;
    max-width: 420px;
}

.cifraat-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cifraat-modal-close:hover {
    color: #374151;
    background: #f3f4f6;
}

.cifraat-modal-box--enrollment .cifraat-modal-icon {
    background: #eef5f0;
    color: #316b4e;
    font-size: 24px;
    width: 52px;
    height: 52px;
}

.cifraat-enrollment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.cifraat-enrollment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 18px 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: 'Poppins', 'Open Sans', sans-serif;
    box-sizing: border-box;
}

.cifraat-enrollment-option:hover {
    border-color: #316b4e;
    background: #f8faf9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 107, 78, 0.12);
}

.cifraat-enrollment-option--contact:hover {
    border-color: #6b7280;
    background: #f9fafb;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.cifraat-enrollment-option__icon {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 4px;
}

.cifraat-enrollment-option__title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}

.cifraat-enrollment-option__desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    text-align: center;
}

.cifraat-enrollment-option__price {
    font-size: 16px;
    font-weight: 700;
    color: #316b4e;
    margin-top: 4px;
    line-height: 1.2;
}

/* Mobile adjustments for enrollment modal */
@media (max-width: 480px) {
    .cifraat-modal-box--enrollment {
        padding: 28px 20px 20px;
        max-width: 100%;
    }

    .cifraat-enrollment-option {
        padding: 14px 16px;
    }

    .cifraat-enrollment-option__title {
        font-size: 14px;
    }

    .cifraat-enrollment-option__desc {
        font-size: 11px;
    }

    .cifraat-enrollment-option__price {
        font-size: 14px;
    }
}
/* Loading spinner inside enrollment options */
.cifraat-enrollment-option { position: relative; }
.cifraat-enrollment-option .cifraat-spinner {
display: none;
width: 18px;
height: 18px;
border: 2px solid rgba(49,107,78,0.25);
border-top-color: #316b4e;
border-radius: 50%;
animation: cifraatSpin 0.7s linear infinite;
margin-right: 8px;
flex-shrink: 0;
}
.cifraat-enrollment-option--contact .cifraat-spinner {
border: 2px solid rgba(107,114,128,0.25);
border-top-color: #6b7280;
}
.cifraat-enrollment-option.cifraat-loading .cifraat-spinner {
display: inline-block;
}
.cifraat-enrollment-option.cifraat-loading .cifraat-enrollment-option__icon,
.cifraat-enrollment-option.cifraat-loading .cifraat-enrollment-option__title,
.cifraat-enrollment-option.cifraat-loading .cifraat-enrollment-option__desc,
.cifraat-enrollment-option.cifraat-loading .cifraat-enrollment-option__price {
opacity: 0.5;
}
.cifraat-enrollment-option.cifraat-loading {
pointer-events: none;
cursor: default;
}
.cifraat-enrollment-options.cifraat-loading {
pointer-events: none;
}
@keyframes cifraatSpin {
to { transform: rotate(360deg); }
}
.cifraat-enrollment-option.cifraat-loading .cifraat-enrollment-option__icon {
display: none;
}
