/* Cookie баннер РКН - CSS */

/* Основные стили баннера */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 3px solid #4d6bfe;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-height: 8vh;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cookie-banner.expanded {
    max-height: none;
}

/* Контент баннера */
.cookie-banner__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Текст баннера */
.cookie-banner__text {
    flex: 1;
    margin-right: 20px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.cookie-banner__link {
    color: #4d6bfe;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cookie-banner__link:hover {
    color: #0065a3;
}

/* Кнопки баннера */
.cookie-banner__buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-banner__button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.cookie-banner__button:hover {
    background: #f5f5f5;
}

.cookie-banner__button--primary {
    background: #147fc2;
    color: white;
    border-color: #147fc2;
}

.cookie-banner__button--primary:hover {
    background: #4791e1;
    border-color: #4791e1;
}

.cookie-banner__button--reject {
    background: #333;
    color: white;
    border-color: #333;
}

.cookie-banner__button--reject:hover {
    background: #555;
    border-color: #555;
}

/* Детальная информация */
.cookie-banner__details {
    display: none;
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.cookie-banner__details.visible {
    display: block;
}

/* Секции настроек */
.cookie-banner__section {
    margin-bottom: 15px;
}

.cookie-banner__section:last-child {
    margin-bottom: 0;
}

.cookie-banner__section h4 {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-banner__section p {
    color: #666;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 8px;
    margin-top: 0;
}

/* Переключатели cookie */
.cookie-toggle {
    position: relative;
    width: 40px;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.cookie-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle.active {
    background: #808000;
}

.cookie-toggle.active::after {
    transform: translateX(20px);
}

.cookie-toggle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle.disabled:hover {
    background: #ddd;
}

/* Скрытое состояние баннера */
.cookie-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .cookie-banner__content {
        padding: 15px;
    }
    
    .cookie-banner__text {
        font-size: 13px;
        margin-right: 15px;
    }
    
    .cookie-banner__button {
        padding: 10px 14px;
        font-size: 12px;
    }
}

/* Мобильная версия */
@media (max-width: 768px) {
    .cookie-banner {
        max-height: 30vh;
    }

    .cookie-banner__content {
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        gap: 8px;
    }

    .cookie-banner__text {
        margin-right: 0;
        margin-bottom: 0;
        font-size: 11px;
        text-align: center;
    }

    .cookie-banner__buttons {
        flex-direction: column;
        gap: 5px;
    }

    .cookie-banner__button {
        padding: 6px;
        font-size: 7px;
        text-align: center;
    }

    .cookie-banner__details {
        padding: 7px;
    }
    
    .cookie-banner__section h4 {
        font-size: 13px;
    }
    
    .cookie-banner__section p {
        font-size: 6px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .cookie-banner__content {
        padding: 6px;
    }
    
    .cookie-banner__text {
        font-size: 9px;
    }
    
    .cookie-banner__button {
        padding: 9px;
        font-size: 10px;
    }
    
    .cookie-banner__details {
        padding: 6px;
    }
}

/* Улучшения для доступности */
.cookie-banner__button:focus {
    outline: 2px solid #808000;
    outline-offset: 2px;
}

.cookie-toggle:focus {
    outline: 2px solid #808000;
    outline-offset: 2px;
}

.cookie-banner__link:focus {
    outline: 2px solid #808000;
    outline-offset: 1px;
}

/* Анимации */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner:not(.hidden) {
    animation: slideUp 0.3s ease-out;
}

/* Дополнительные стили для лучшего отображения */
.cookie-banner * {
    box-sizing: border-box;
}

.cookie-banner__details .cookie-banner__buttons {
    margin-top: 15px;
}

@media (max-width: 768px) {
    .cookie-banner__details .cookie-banner__buttons {
        flex-direction: row;
        gap: 10px;
    }
    
    .cookie-banner__details .cookie-banner__button {
        flex: 1;
        padding: 10px 8px;
        font-size: 13px;
    }
}