/**
 * Плагин: RU Cookie Notice
 * Файл: ru-cookie-notice.css
 * Путь: /ru-cookie-notice/assets/css/ru-cookie-notice.css
 * Назначение: изолированные стили фронтенда (BEM)
 * * Developer Passport
 * Studio: Lana Digital
 * Website: https://lana-digital.ru/
 */

/* * СТРОГАЯ ИЗОЛЯЦИЯ CSS
 * Все селекторы привязаны к корневому классу .ru-cookie-notice-wrapper.
 * Предотвращает конфликт с глобальными стилями темы и конструкторов.
 */

 .ru-cookie-notice-wrapper {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    z-index: 9999999 !important;
    width: 600px !important; /* Более широкая карточка для выравнивания в ряд */
    max-width: calc(100% - 48px) !important;
    
    /* Премиальное оформление карточки */
    border-radius: 12px !important;
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.15), 0 6px 16px -4px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    
    /* Сброс базовых стилей */
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
    
    /* Плавное появление и исчезновение */
    opacity: 0;
    transform: translateY(20px);
    animation: ruCookieNoticeFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
    visibility: visible;
}

/* Класс для плавного скрытия карточки (добавляется через JS) */
.ru-cookie-notice-wrapper.ru-cookie-notice--hiding {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Контейнер контента внутри карточки - композиция Flexbox */
.ru-cookie-notice-wrapper .ru-cookie-notice__container {
    padding: 24px !important;
    display: flex !important;
    flex-direction: row !important; /* Горизонтальное выравнивание */
    align-items: center !important;
    justify-content: space-between !important;
    gap: 32px !important;
    box-sizing: border-box !important;
}

/* Блок контента занимает всё свободное место */
.ru-cookie-notice-wrapper .ru-cookie-notice__content {
    flex: 1 !important;
    min-width: 0 !important; /* Защита от переполнения Flexbox */
}

/* Текстовый блок */
.ru-cookie-notice-wrapper .ru-cookie-notice__text {
    margin: 0 !important;
    padding: 0 !important;
}

/* Сброс параграфа внутри текста */
.ru-cookie-notice-wrapper .ru-cookie-notice__text p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
    text-align: left !important;
}

/* Ссылка на политику */
.ru-cookie-notice-wrapper .ru-cookie-notice__text a.ru-cookie-notice__link {
    text-decoration: none !important;
    border-bottom-width: 1px !important;
    border-bottom-style: solid !important;
    font-weight: 500 !important;
    transition: opacity 0.2s ease !important;
    display: inline !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.ru-cookie-notice-wrapper .ru-cookie-notice__text a.ru-cookie-notice__link:hover {
    opacity: 0.7 !important;
}

/* Блок с кнопкой */
.ru-cookie-notice-wrapper .ru-cookie-notice__actions {
    display: flex !important;
    flex-shrink: 0 !important; /* Кнопка не сжимается */
    margin: 0 !important;
    padding: 0 !important;
}

/* Кнопка принятия */
.ru-cookie-notice-wrapper button.ru-cookie-notice__btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    margin: 0 !important;
    padding: 12px 28px !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    letter-spacing: 0.3px !important;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease, box-shadow 0.2s ease !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
    text-transform: none !important;
    text-decoration: none !important;
}

.ru-cookie-notice-wrapper button.ru-cookie-notice__btn:hover {
    /* Для графитового цвета brightness 1.15 даёт идеальное премиальное осветление */
    filter: brightness(1.15) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
}

.ru-cookie-notice-wrapper button.ru-cookie-notice__btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

/* Анимация появления */
@keyframes ruCookieNoticeFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность для планшетов и мобильных устройств */
@media (max-width: 650px) {
    .ru-cookie-notice-wrapper {
        width: 100% !important;
        bottom: 16px !important;
        left: 16px !important;
        max-width: calc(100% - 32px) !important;
    }
    
    .ru-cookie-notice-wrapper .ru-cookie-notice__container {
        flex-direction: column !important; /* Перестраиваем вертикально */
        align-items: flex-start !important;
        padding: 20px !important;
        gap: 20px !important;
    }
    
    .ru-cookie-notice-wrapper .ru-cookie-notice__actions {
        width: 100% !important;
    }
    
    .ru-cookie-notice-wrapper button.ru-cookie-notice__btn {
        width: 100% !important;
        padding: 14px 24px !important;
    }
}