/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

/* Modal Styles */
.modal {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6B7280;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #2C2C2C;
}

.modal-logo {
    text-align: center;
    margin-bottom: 30px;
}

.modal-logo h3 {
    color: #EB0028;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.modal-logo p {
    color: #D4AF37;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-headline {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2C2C2C;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.4;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #F9FAFB;
}

.form-input:focus {
    outline: none;
    border-color: #D4AF37;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-input::placeholder {
    color: #9CA3AF;
}

/* Validation States */
.form-input.error {
    border-color: #EF4444;
    background: #FEF2F2;
}

.form-input.error:focus {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.valid {
    border-color: #10B981;
    background: #F0FDF4;
}

.form-input.valid:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Error Messages */
.error-message {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 5px;
    display: none;
    animation: slideDown 0.3s ease;
}

.error-message.show {
    display: block;
}

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

/* Phone Input */
.phone-group {
    display: flex;
    gap: 10px;
}

.country-select {
    width: 80px;
    padding: 15px 10px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 1rem;
    background: #F9FAFB;
    transition: all 0.3s ease;
}

.country-select:focus {
    outline: none;
    border-color: #D4AF37;
    background: #FFFFFF;
}

.phone-input {
    flex: 1;
}

/* CTA Button */
.modal .cta-button {
    width: 100%;
    background: linear-gradient(135deg, #EB0028 0%, #D4AF37 100%);
    color: white;
    padding: 18px;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(235, 0, 40, 0.3);
}

.modal .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(235, 0, 40, 0.4);
}

.modal .cta-button:active {
    transform: translateY(0);
}

.modal .cta-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.loading {
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s ease infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .modal {
        padding: 30px 20px;
        margin: 10px;
    }

    .modal-headline {
        font-size: 1.1rem;
    }

    .phone-group {
        flex-direction: column;
    }

    .country-select {
        width: 100%;
    }
}
