/**
 * contact-modal-improvements.css - Покращені стилі для модального вікна зв'язку зі спеціалістом
 */

/* Базові стилі для контактного модального вікна */
.contact-specialist-modal {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Базова розмітка модалки (без inline стилів у JS) */
.contact-specialist-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.5);
}

.contact-specialist-modal .modal-content {
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow: auto;
    padding: 28px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.contact-specialist-modal .contact-modal-header {
    text-align: center;
    margin-bottom: 18px;
}

.contact-specialist-modal .contact-modal-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 700;
}

.contact-specialist-modal .contact-modal-meta {
    margin-bottom: 10px;
}

.contact-specialist-modal .form-group {
    margin-bottom: 14px;
}

.contact-specialist-modal .form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.contact-specialist-modal .modal-error {
    display: none;
    margin: 10px 0 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(231, 76, 60, 0.35);
    background: rgba(231, 76, 60, 0.12);
    color: #ffb4b4;
    font-weight: 600;
    line-height: 1.4;
}

.contact-specialist-modal .modal-error.show {
    display: block;
}

.contact-specialist-modal .modal-info {
    margin: 10px 0 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(52, 152, 219, 0.35);
    background: rgba(52, 152, 219, 0.12);
    color: #cfe8ff;
    font-weight: 600;
    line-height: 1.4;
}

.contact-specialist-modal .btn-primary[disabled],
.contact-specialist-modal .btn-secondary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Покращення для світлої теми */
body.light-theme .contact-specialist-modal {
    background: rgba(0, 0, 0, 0.6) !important;
}

body.light-theme .contact-specialist-modal .modal-content {
    background: #ffffff !important;
    border: 1px solid #e1e5e9 !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .contact-specialist-modal h3 {
    color: #2c3e50 !important;
    font-weight: 600 !important;
    text-shadow: none !important;
}

body.light-theme .contact-specialist-modal .specialist-name {
    color: #3498db !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}

body.light-theme .contact-specialist-modal .specialist-occupation {
    color: #7f8c8d !important;
    font-weight: 500 !important;
}

body.light-theme .contact-specialist-modal .specialist-location {
    color: #95a5a6 !important;
}

/* Покращені стилі для форми в світлій темі */
body.light-theme .contact-specialist-modal label {
    color: #2c3e50 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

body.light-theme .contact-specialist-modal input,
body.light-theme .contact-specialist-modal textarea {
    background: #f8f9fa !important;
    border: 2px solid #e9ecef !important;
    color: #2c3e50 !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
}

body.light-theme .contact-specialist-modal input:focus,
body.light-theme .contact-specialist-modal textarea:focus {
    background: #ffffff !important;
    border-color: #3498db !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1) !important;
}

body.light-theme .contact-specialist-modal input::placeholder,
body.light-theme .contact-specialist-modal textarea::placeholder {
    color: #95a5a6 !important;
    font-weight: 400 !important;
}

/* Покращені стилі для кнопок */
body.light-theme .contact-specialist-modal .btn-primary {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3) !important;
    font-family: 'Montserrat', sans-serif !important;
}

body.light-theme .contact-specialist-modal .btn-primary:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4) !important;
}

body.light-theme .contact-specialist-modal .btn-secondary,
body.light-theme .contact-specialist-modal #contact-close-btn,
html.light-theme body .contact-specialist-modal .btn-secondary,
html.light-theme body .contact-specialist-modal #contact-close-btn {
    background: #e8eef3 !important;
    background-color: #e8eef3 !important;
    border: 2px solid #94a3b8 !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    font-weight: 600 !important;
    padding: 10px 22px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    font-family: 'Montserrat', sans-serif !important;
}

body.light-theme .contact-specialist-modal .btn-secondary:hover,
body.light-theme .contact-specialist-modal #contact-close-btn:hover,
html.light-theme body .contact-specialist-modal .btn-secondary:hover {
    background: #d5dde5 !important;
    background-color: #d5dde5 !important;
    border-color: #64748b !important;
    color: #0f172a !important;
    -webkit-text-fill-color: #0f172a !important;
    transform: translateY(-1px) !important;
}

/* Покращення контрасту тексту */
body.light-theme .contact-specialist-modal .modal-content * {
    text-shadow: none !important;
}

/* Адаптивність для мобільних пристроїв */
@media (max-width: 768px) {
    body.light-theme .contact-specialist-modal .modal-content {
        margin: 15px !important;
        padding: 25px !important;
    }
    
    body.light-theme .contact-specialist-modal h3 {
        font-size: 20px !important;
    }
    
    body.light-theme .contact-specialist-modal .specialist-name {
        font-size: 16px !important;
    }
    
    body.light-theme .contact-specialist-modal input,
    body.light-theme .contact-specialist-modal textarea {
        font-size: 16px !important; /* Запобігає зумуванню на iOS */
    }
}

/* Додаткові покращення читабельності */
body.light-theme .contact-specialist-modal {
    letter-spacing: 0.3px !important;
}

body.light-theme .contact-specialist-modal .modal-content {
    line-height: 1.6 !important;
}

/* Покращення видимості заповнювачів */
body.light-theme .contact-specialist-modal input[type="text"],
body.light-theme .contact-specialist-modal input[type="email"],
body.light-theme .contact-specialist-modal textarea {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* Стилі для режиму лише перегляду (коли email недоступний) */
body.light-theme .contact-specialist-modal .no-contact-info {
    background: #f1f2f6 !important;
    border: 2px solid #ddd !important;
    border-radius: 10px !important;
    padding: 20px !important;
    text-align: center !important;
}

body.light-theme .contact-specialist-modal .no-contact-info p {
    color: #2c3e50 !important;
    font-weight: 500 !important;
    margin: 0 !important;
}

/* Додаткові стилі для темної теми (для кращого контрасту) */
body:not(.light-theme) .contact-specialist-modal .modal-content {
    background: #2c3e50 !important;
    color: #ecf0f1 !important;
}

body:not(.light-theme) .contact-specialist-modal h3 {
    color: #3498db !important;
}

body:not(.light-theme) .contact-specialist-modal .specialist-name {
    color: #e74c3c !important;
}

body:not(.light-theme) .contact-specialist-modal .specialist-occupation {
    color: #95a5a6 !important;
}

body:not(.light-theme) .contact-specialist-modal label {
    color: #ecf0f1 !important;
}

/* Світлий фон сторінки не повинен чорнити текст у темній контакт-модалці */
body.light-background-active:not(.light-theme) .contact-specialist-modal .modal-content,
body.force-dark-cards:not(.light-theme) .contact-specialist-modal .modal-content {
    background: #2c3e50 !important;
    color: #ecf0f1 !important;
}

body.light-background-active:not(.light-theme) .contact-specialist-modal h3,
body.light-background-active:not(.light-theme) .contact-specialist-modal label,
body.light-background-active:not(.light-theme) .contact-specialist-modal p,
body.light-background-active:not(.light-theme) .contact-specialist-modal span,
body.force-dark-cards:not(.light-theme) .contact-specialist-modal h3,
body.force-dark-cards:not(.light-theme) .contact-specialist-modal label,
body.force-dark-cards:not(.light-theme) .contact-specialist-modal p,
body.force-dark-cards:not(.light-theme) .contact-specialist-modal span {
    color: #ecf0f1 !important;
}

body:not(.light-theme) .contact-specialist-modal input,
body:not(.light-theme) .contact-specialist-modal textarea {
    background: #34495e !important;
    border: 2px solid #5d6d7e !important;
    color: #ecf0f1 !important;
}

body:not(.light-theme) .contact-specialist-modal input:focus,
body:not(.light-theme) .contact-specialist-modal textarea:focus {
    border-color: #3498db !important;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2) !important;
} 

/* Кнопки в темній темі — такі ж розміри, як у світлій (padding/font-size/radius) */
body:not(.light-theme) .contact-specialist-modal .btn-primary {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 12px 24px !important; /* як у light */
    border-radius: 8px !important; /* як у light */
    font-size: 14px !important; /* як у light */
    line-height: 1.2 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.25) !important;
    font-family: 'Montserrat', sans-serif !important;
}

body:not(.light-theme) .contact-specialist-modal .btn-primary:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.35) !important;
}

body:not(.light-theme) .contact-specialist-modal .btn-secondary {
    background: rgba(236, 240, 241, 0.08) !important;
    border: 2px solid rgba(189, 195, 199, 0.55) !important;
    color: #ecf0f1 !important;
    font-weight: 600 !important;
    padding: 10px 22px !important; /* як у light */
    border-radius: 8px !important; /* як у light */
    font-size: 14px !important; /* як у light */
    line-height: 1.2 !important;
    transition: all 0.3s ease !important;
    font-family: 'Montserrat', sans-serif !important;
}

body:not(.light-theme) .contact-specialist-modal .btn-secondary:hover {
    background: rgba(236, 240, 241, 0.14) !important;
    border-color: rgba(149, 165, 166, 0.8) !important;
    transform: translateY(-1px) !important;
}