/* ============================================================
   SHARED CONTACT MODAL STYLES
   Include on index.html with:
   <link rel="stylesheet" href="css/contact-modal.css">
   ============================================================ */

/* ===== Modal Overlay ===== */
.contact-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* ===== Modal Box ===== */
.contact-modal {
    background: white;
    border-radius: 20px;
    max-width: 780px;
    width: 100%;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin: auto;
}

.contact-modal-overlay.active .contact-modal {
    transform: translateY(0) scale(1);
}

/* Close button */
.contact-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.contact-modal-close:hover {
    background: rgba(255, 107, 53, 0.9);
    transform: rotate(90deg);
}

/* ===== Modal Header ===== */
.contact-modal-header {
    padding: 2.5rem 2.5rem 1.75rem;
    background: linear-gradient(135deg, #1A1A1A 0%, #2C2C2C 100%);
    border-radius: 20px 20px 0 0;
    color: white;
}

.contact-modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #D4AF37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-right: 3rem;
}

.contact-modal-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Modal Body ===== */
.contact-modal-body {
    padding: 2rem 2.5rem 2.5rem;
}

/* Form groups (dark-theme overrides for modal) */
.contact-modal-body .form-group {
    margin-bottom: 1.25rem;
}

.contact-modal-body .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2C2C2C;
    font-weight: 500;
    font-size: 0.9rem;
}

.contact-modal-body .form-group label .required {
    color: #FF6B35;
}

.contact-modal-body .form-group input,
.contact-modal-body .form-group select,
.contact-modal-body .form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #F8F9FA;
    color: #2C2C2C;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-modal-body .form-group input:focus,
.contact-modal-body .form-group select:focus,
.contact-modal-body .form-group textarea:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
    background: white;
}

.contact-modal-body .form-group input::placeholder,
.contact-modal-body .form-group textarea::placeholder {
    color: #aaa;
}

.contact-modal-body .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Checkbox group */
.contact-modal-body .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 0.5rem;
}

.contact-modal-body .checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #2C2C2C;
}

.contact-modal-body .checkbox-item input[type="checkbox"] {
    width: auto;
    accent-color: #D4AF37;
}

.contact-modal-body .checkbox-item label {
    margin: 0;
    font-weight: 400;
    cursor: pointer;
}

/* Submit button */
.contact-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    font-family: inherit;
}

.contact-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
}

.contact-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== Success State ===== */
.contact-success-state {
    text-align: center;
    padding: 3.5rem 2.5rem;
    display: none;
}

.contact-success-state.active {
    display: block;
}

.contact-success-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: white;
    margin: 0 auto 1.5rem;
    animation: contactSuccessPop 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes contactSuccessPop {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.contact-success-state h3 {
    font-size: 1.75rem;
    color: #2C2C2C;
    margin-bottom: 0.75rem;
}

.contact-success-state p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

.contact-success-close {
    background: linear-gradient(135deg, #D4AF37 0%, #B8941F 100%);
    color: white;
    padding: 0.85rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.contact-success-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
}

/* Error message */
.contact-error-msg {
    display: none;
    background: #f8d7da;
    color: #721c24;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
    font-size: 0.9rem;
}

.contact-error-msg.active {
    display: block;
}

/* Loading spinner */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .contact-modal-overlay {
        padding: 1rem 0.5rem;
        align-items: flex-start;
    }

    .contact-modal {
        max-height: calc(100vh - 2rem);
        border-radius: 16px;
    }

    .contact-modal-header {
        padding: 2rem 1.5rem 1.25rem;
        border-radius: 16px 16px 0 0;
    }

    .contact-modal-header h2 {
        font-size: 1.35rem;
    }

    .contact-modal-body {
        padding: 1.5rem 1.5rem 2rem;
    }

    .contact-modal-body .form-row {
        grid-template-columns: 1fr;
    }

    .contact-success-state {
        padding: 2.5rem 1.5rem;
    }

    .contact-success-state h3 {
        font-size: 1.4rem;
    }
}