/* ============================================
   ATOMIC MODULES INTEGRATION
   ============================================ */

/* Стили для интеграции модулей прелоадера и фактов */

/* Общие стили для модулей */
.atomic-module {
    position: relative;
    z-index: 1000;
}

/* Интеграция прелоадера с фактами */
.atomic-preloader .atomic-facts {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin: 0;
}

.atomic-preloader .atomic-facts::before {
    display: none;
}

.atomic-preloader .atomic-facts__header {
    display: none;
}

.atomic-preloader .atomic-facts__navigation {
    display: none;
}

.atomic-preloader .atomic-facts__fact {
    position: static;
    opacity: 1;
    transform: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
}

.atomic-preloader .atomic-facts__fact-content {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
}

.atomic-preloader .atomic-facts__fact-image {
    display: none;
}

.atomic-preloader .atomic-facts__fact-text {
    font-size: 1rem;
    color: rgba(17, 24, 38, 0.8);
    margin: 0;
    line-height: 1.5;
}

.atomic-preloader .atomic-facts__fact-category {
    display: none;
}

/* Анимации для интеграции */
.atomic-modules-transition {
    transition: all 0.6s ease;
}

.atomic-modules-fade-in {
    animation: atomicModulesFadeIn 0.6s ease;
}

.atomic-modules-slide-up {
    animation: atomicModulesSlideUp 0.6s ease;
}

@keyframes atomicModulesFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes atomicModulesSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
    .atomic-preloader .atomic-facts {
        bottom: 1rem;
        width: 95%;
        padding: 1rem;
    }
    
    .atomic-preloader .atomic-facts__fact-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .atomic-preloader .atomic-facts {
        bottom: 0.5rem;
        width: 98%;
        padding: 0.75rem;
    }
    
    .atomic-preloader .atomic-facts__fact-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }
}

/* Стили для темной темы (если потребуется) */
@media (prefers-color-scheme: dark) {
    .atomic-preloader .atomic-facts {
        background: rgba(0, 0, 0, 0.8);
        color: #ffffff;
    }
    
    .atomic-preloader .atomic-facts__fact-text {
        color: rgba(255, 255, 255, 0.9);
    }
}

/* Стили для печати */
@media print {
    .atomic-preloader,
    .atomic-facts {
        display: none !important;
    }
}

/* Стили для высокого контраста */
@media (prefers-contrast: high) {
    .atomic-preloader .atomic-facts {
        background: #ffffff;
        border: 2px solid #000000;
    }
    
    .atomic-preloader .atomic-facts__fact-text {
        color: #000000;
    }
}

/* Стили для уменьшенной анимации */
@media (prefers-reduced-motion: reduce) {
    .atomic-modules-transition,
    .atomic-modules-fade-in,
    .atomic-modules-slide-up {
        animation: none;
        transition: none;
    }
    
    .atomic-preloader .atomic-facts {
        transition: none;
    }
}

/* Стили для фокуса (доступность) */
.atomic-facts__button:focus,
.atomic-facts__nav-button:focus {
    outline: 2px solid #294ea1;
    outline-offset: 2px;
}

/* Стили для скрытых элементов */
.atomic-module.hidden {
    display: none !important;
}

.atomic-module.invisible {
    visibility: hidden;
    opacity: 0;
}

/* Стили для загрузки */
.atomic-module.loading {
    pointer-events: none;
    opacity: 0.7;
}

.atomic-module.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #294ea1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Стили для ошибок */
.atomic-module.error {
    border: 2px solid #dc3545;
    background: #f8d7da;
    color: #721c24;
}

.atomic-module.error::before {
    content: '⚠️';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.2em;
}

/* Стили для успешной загрузки */
.atomic-module.success {
    border: 2px solid #28a745;
    background: #d4edda;
    color: #155724;
}

.atomic-module.success::before {
    content: '✅';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.2em;
}
