/* ===== ОБЩИЕ СТИЛИ ДЛЯ МОДАЛЬНЫХ ОКОН ФУТЕРА PHARMANEXT ===== */
/* Файл: assets/css/footer/footer-modals.css */

/* Базовые стили для всех модальных окон футера */
.footer-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.footer-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Основной контейнер модального окна */
.footer-modal-content {
    background: white;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-heavy);
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    position: relative;
}

.footer-modal-overlay.show .footer-modal-content {
    transform: scale(1);
}

/* Шапка модального окна */
.footer-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.footer-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--error-color);
    transform: rotate(90deg);
}

/* Тело модального окна */
.footer-modal-body {
    padding: 1.5rem;
    max-height: calc(90vh - 240px);
    overflow-y: auto;
}

/* Информационные блоки */
.footer-modal-info {
    background: rgba(8, 169, 170, 0.05);
    border: 1px solid rgba(8, 169, 170, 0.2);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.footer-modal-info h3 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-modal-info p {
    margin: 0.5rem 0;
    color: var(--dark-color);
    line-height: 1.6;
}

.footer-modal-info strong {
    color: var(--primary-color);
}

/* Секции контента */
.footer-modal-section {
    margin-bottom: 2rem;
}

.footer-modal-section:last-child {
    margin-bottom: 0;
}

.footer-modal-section h4 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-modal-section p {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: var(--dark-color);
}

.footer-modal-section ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.footer-modal-section li {
    margin: 0.25rem 0;
    line-height: 1.5;
    color: var(--dark-color);
}

/* Кнопки действий */
.footer-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
    background: white;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.footer-modal-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.footer-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 169, 170, 0.3);
}

.footer-modal-btn.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.footer-modal-btn.secondary:hover {
    background: var(--primary-color);
    color: white;
}

.footer-modal-btn.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #219a52 100%);
}

.footer-modal-btn.success:hover {
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Индикаторы загрузки */
.footer-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #666;
}

.footer-modal-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: footerModalSpin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes footerModalSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Состояния ошибок */
.footer-modal-error {
    text-align: center;
    padding: 2rem;
    color: var(--error-color);
}

.footer-modal-error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.footer-modal-error h3 {
    color: var(--error-color);
    margin-bottom: 0.5rem;
}

/* Формы */
.footer-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-modal-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-modal-form-label {
    font-weight: 500;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.footer-modal-form-input,
.footer-modal-form-textarea,
.footer-modal-form-select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-family);
    transition: var(--transition);
}

.footer-modal-form-input:focus,
.footer-modal-form-textarea:focus,
.footer-modal-form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(8, 169, 170, 0.1);
}

.footer-modal-form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Контактная информация */
.footer-modal-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-modal-contact-item {
    text-align: center;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.footer-modal-contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-modal-contact-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.footer-modal-contact-details {
    color: #666;
    font-size: 0.9rem;
}

.footer-modal-contact-details a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-modal-contact-details a:hover {
    text-decoration: underline;
}

/* Списки особенностей/преимуществ */
.footer-modal-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.footer-modal-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(8, 169, 170, 0.02);
    border-radius: var(--border-radius);
    border: 1px solid rgba(8, 169, 170, 0.1);
}

.footer-modal-feature-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.footer-modal-feature-content h5 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-color);
}

.footer-modal-feature-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

/* Пошаговые инструкции */
.footer-modal-steps {
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-modal-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
}

.footer-modal-step::before {
    counter-increment: step-counter;
    content: counter(step-counter);
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.footer-modal-step-content h5 {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--dark-color);
}

.footer-modal-step-content p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* Карточки с иконками */
.footer-modal-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.footer-modal-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.footer-modal-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.footer-modal-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-modal-card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.footer-modal-card-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .footer-modal-content {
        max-width: 95%;
    }
    
    .footer-modal-contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-modal-features {
        grid-template-columns: 1fr;
    }
    
    .footer-modal-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .footer-modal-content {
        width: 98%;
        max-height: 95vh;
        margin: 1rem;
    }

    .footer-modal-header {
        padding: 1rem;
    }

    .footer-modal-title {
        font-size: 1.2rem;
    }

    .footer-modal-body {
        padding: 1rem;
        max-height: calc(95vh - 220px);
    }

    .footer-modal-contact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-modal-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-modal-btn {
        width: 100%;
        justify-content: center;
    }
    
    .footer-modal-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-modal-step {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
}

/* Мелкие экраны */
@media (max-width: 480px) {
    .footer-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .footer-modal-body {
        max-height: calc(100vh - 200px);
    }
    
    .footer-modal-actions {
        padding: 1rem;
    }
    
    .footer-modal-info {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer-modal-contact-item {
        padding: 0.75rem;
    }
    
    .footer-modal-contact-icon {
        font-size: 2rem;
    }
    
    .footer-modal-feature {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Специальные стили для отдельных типов модалок */
.about-modal-content {
    max-width: 900px;
}

.careers-modal-content {
    max-width: 1000px;
}

.faq-modal-content {
    max-width: 800px;
}

.consultation-modal-content {
    max-width: 600px;
}

/* FAQ аккордеон */
.footer-modal-faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.footer-modal-faq-question {
    background: var(--light-color);
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    border: none;
    width: 100%;
    text-align: left;
}

.footer-modal-faq-question:hover {
    background: #e9ecef;
}

.footer-modal-faq-question.active {
    background: var(--primary-color);
    color: white;
}

.footer-modal-faq-icon {
    transition: transform 0.3s ease;
}

.footer-modal-faq-question.active .footer-modal-faq-icon {
    transform: rotate(180deg);
}

.footer-modal-faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.footer-modal-faq-answer.active {
    padding: 1rem;
    max-height: 300px;
}

.footer-modal-faq-answer p {
    margin: 0;
    line-height: 1.6;
    color: var(--dark-color);
}

/* ===== СПЕЦИФИЧНЫЕ СТИЛИ ДЛЯ ЛИЦЕНЗИЙ ===== */

/* Область просмотра лицензии */
.license-viewer {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    min-height: 400px;
    border: 1px solid var(--border-color);
}

/* Изображение лицензии */
.license-image {
    max-width: 100%;
    max-height: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    transition: var(--transition);
}

.license-image:hover {
    transform: scale(1.02);
}

/* Индикатор загрузки лицензии */
.license-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #666;
}

.license-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: licenseSpinAnimation 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes licenseSpinAnimation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Состояние ошибки лицензии */
.license-error {
    text-align: center;
    padding: 2rem;
    color: var(--error-color);
}

.license-error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.license-error h3 {
    color: var(--error-color);
    margin-bottom: 0.5rem;
}

/* Кнопка скачивания лицензии */
.license-download-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    margin-top: 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.license-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(8, 169, 170, 0.3);
}

/* Кнопка полноэкранного режима */
.license-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0;
    transition: var(--transition);
}

.license-viewer:hover .license-fullscreen-btn {
    opacity: 1;
}

.license-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Полноэкранный режим лицензии */
.license-fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    cursor: zoom-out;
}

.license-fullscreen-image {
    max-width: 95%;
    max-height: 95%;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.license-fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.license-fullscreen-close:hover {
    background: white;
    transform: rotate(90deg);
}

/* Многостраничный просмотр лицензии */
.license-multipage-viewer {
    width: 100%;
    max-width: 100%;
}

.license-page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(8, 169, 170, 0.05);
    border: 1px solid rgba(8, 169, 170, 0.2);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.page-nav-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.page-nav-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.page-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.page-indicator {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.license-pages-container {
    position: relative;
    text-align: center;
}

.license-page {
    width: 100%;
}

.license-page-image {
    max-width: 100%;
    max-height: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    cursor: pointer;
    transition: var(--transition);
}

.license-page-image:hover {
    transform: scale(1.02);
}

/* Полноэкранная навигация для многостраничных лицензий */
.license-fullscreen-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    color: white;
}

.fullscreen-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.fullscreen-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
}

.fullscreen-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fullscreen-page-indicator {
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 60px;
    text-align: center;
}

/* PDF Viewer для лицензий */
.license-pdf-viewer {
    width: 100%;
    max-width: 100%;
    text-align: center;
}

.pdf-viewer-info {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    color: #856404;
}

.pdf-viewer-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.license-pdf-frame {
    width: 100%;
    height: 500px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #f8f9fa;
}

/* Адаптивность для лицензий */
@media (max-width: 768px) {
    .license-page-navigation {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .page-nav-btn {
        padding: 0.6rem 1.2rem;
        width: 120px;
    }
    
    .license-page-image {
        max-height: 400px;
    }
    
    .license-fullscreen-nav {
        bottom: 20px;
        padding: 0.5rem 1rem;
    }
    
    .fullscreen-nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .license-pdf-frame {
        height: 400px;
    }
    
    .pdf-viewer-info {
        padding: 0.75rem;
    }
    
    .pdf-viewer-info p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .license-page-navigation {
        padding: 0.5rem;
    }
    
    .page-nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        width: 100px;
    }
    
    .page-indicator {
        font-size: 0.8rem;
    }
    
    .license-page-image {
        max-height: 300px;
    }
    
    .license-fullscreen-nav {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .license-pdf-frame {
        height: 300px;
    }
}