/* ===== MODAL AND FORM STYLES ===== */
/* Shared modal/form styles across pages */

/* ===== MODAL CONTAINER ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 2000;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s ease;
    pointer-events: none;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(28, 28, 30, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: min(500px, 90%);
    height: auto;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.5s cubic-bezier(0.23, 0.06, 0.25, 1);
    margin: 0;
    transition: transform 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translate(-50%, -45%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* ===== MODAL HEADER ===== */
.modal-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    position: relative;
    text-align: center;
}

.modal-logo {
    margin-bottom: 0;
}

.modal-logo img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 229, 255, 0.3));
}

.modal-tagline {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 0.3rem 0;
    text-align: center;
    letter-spacing: 0.5px;
}

.modal-divider {
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    margin: 0.6rem auto 1rem auto;
}

.modal-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
    line-height: 1.3;
}

.close-modal {
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    padding: 0.5rem;
}

.close-modal:hover {
    color: var(--primary-accent);
}

/* ===== FORM CONTAINER ===== */
.form-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    max-height: calc(90vh - 80px);
}

.form-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    align-items: stretch;
}

/* ===== FORM FIELDS ===== */
.form-group {
    margin-bottom: 1rem;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(30, 30, 30, 0.7);
    color: var(--text-primary);
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
    min-height: 3rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.25);
    background-color: rgba(30, 30, 30, 0.8);
}

.form-group .error {
    border-color: var(--primary-accent) !important;
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.25);
}

/* ===== PHONE INPUT ===== */
.phone-input-container {
    display: flex;
    width: 100%;
    gap: 0.5rem;
}

.country-select {
    flex: 0 0 auto;
    width: 120px;
}

.country-select select {
    width: 100%;
    padding-right: 0.5rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-input-container input[type="tel"] {
    flex: 1;
}

/* ===== CHECKBOX STYLES ===== */
.checkbox-group {
    margin-bottom: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    opacity: 0;
    position: absolute;
}

.checkmark {
    flex: 0 0 auto;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 3px;
    background-color: rgba(40, 40, 40, 0.9);
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    margin-top: 0.7rem;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: var(--primary-accent);
    border-color: var(--primary-accent);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    transform: rotate(45deg);
}

.checkbox-text {
    flex: 1;
    font-size: 0.765rem;
    color: var(--text-primary);
}

/* ===== VALIDATION ===== */
.validation-message {
    display: none;
    color: var(--primary-accent);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 400;
}

.form-group.error .validation-message {
    display: block;
}

.form-group input:invalid:not(:placeholder-shown) ~ .validation-message,
.form-group select:invalid:not(:focus):not([value=""]) ~ .validation-message {
    display: block;
}

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:focus):not([value=""]) {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 1px var(--primary-accent);
}

/* ===== FORM BUTTONS ===== */
.form-buttons {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    gap: 1rem;
    width: 100%;
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: #000;
    padding: 0.8rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: auto;
    min-width: 120px;
    text-align: center;
    min-height: 2.75rem;
}

.submit-btn:hover, 
.submit-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===== SUCCESS CONTENT ===== */
.success-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    padding: 2rem;
}

.success-icon {
    font-size: 2.5rem;
    color: var(--secondary-accent);
    margin-bottom: 1.5rem;
    background: rgba(0, 255, 127, 0.2);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 0 20px rgba(0, 255, 127, 0.3);
}

.success-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
}

.success-content p {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.success-content .second-message {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.close-btn {
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: #000;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 2rem;
    min-height: 2.75rem;
}

.close-btn:hover, 
.close-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.4);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-logo img {
        height: 50px;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        max-height: 95vh;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .checkbox-text {
        font-size: 0.8rem;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .submit-btn,
    .close-btn {
        width: 100%;
    }
}