/* ============================================
   БАННЕР СОГЛАСИЯ НА ИСПОЛЬЗОВАНИЕ COOKIES
   Соответствует законодательству РФ
   
   ВАЖНО: При изменении стилей учитывать RTL языки!
   RTL языки: арабский (ar), иврит (he), фарси (fa), урду (ur)
   ============================================ */

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    background: var(--bg-surface);
    border-top: 2px solid var(--color-primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    padding: 24px 20px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-consent-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.cookie-consent-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.cookie-consent-content {
    flex: 1;
    min-width: 0;
}

.cookie-consent-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-consent-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}

.cookie-consent-link {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color 0.2s;
}

.cookie-consent-link:hover {
    color: var(--color-primary-hover);
}

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-consent-btn {
    padding: 12px 24px;
    border-radius: var(--radius-btn);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.cookie-consent-btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    color: white;
}

.cookie-consent-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.cookie-consent-btn-secondary {
    background: var(--bg-body);
    color: var(--text-main);
    border: 2px solid var(--border-color);
}

.cookie-consent-btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--color-primary);
}

.cookie-consent-btn-link {
    background: transparent;
    color: var(--color-primary);
    padding: 12px 16px;
}

.cookie-consent-btn-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* Расширенные настройки */
.cookie-consent-settings {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: none;
}

.cookie-consent-settings.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-consent-settings-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 16px 0;
}

.cookie-consent-category {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-body);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.cookie-consent-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.cookie-consent-category-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-consent-category-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.cookie-consent-category-description {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.cookie-consent-toggle {
    position: relative;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-consent-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-consent-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-consent-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle-slider {
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.cookie-consent-toggle input:checked + .cookie-consent-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-consent-toggle input:disabled + .cookie-consent-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Адаптивность */
@media (max-width: 768px) {
    .cookie-consent {
        padding: 20px 16px;
    }
    
    .cookie-consent-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .cookie-consent-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .cookie-consent-title {
        font-size: 1.125rem;
    }
    
    .cookie-consent-text {
        font-size: 0.8125rem;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-consent-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-consent-category-header {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .cookie-consent {
        padding: 16px 12px;
    }
    
    .cookie-consent-title {
        font-size: 1rem;
    }
    
    .cookie-consent-text {
        font-size: 0.75rem;
    }
    
    .cookie-consent-btn {
        padding: 10px 20px;
        font-size: 0.8125rem;
    }
}

/* Темная тема */
[data-theme="dark"] .cookie-consent {
    background: var(--bg-surface);
    border-top-color: var(--color-primary);
}

[data-theme="dark"] .cookie-consent-category {
    background: var(--bg-body);
    border-color: var(--border-color);
}

[data-theme="dark"] .cookie-consent-toggle-slider {
    background-color: var(--border-color);
}

[data-theme="dark"] .cookie-consent-btn-secondary {
    background: var(--bg-body);
    border-color: var(--border-color);
}

/* ============================================
   RTL (Right-to-Left) ПОДДЕРЖКА
   Для арабского и других RTL языков
   ============================================ */

[dir="rtl"] .cookie-consent {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .cookie-consent-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-consent-title {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-consent-actions {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

[dir="rtl"] .cookie-consent-category-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-consent-category-title {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-consent-toggle-slider:before {
    left: auto;
    right: 3px;
}

[dir="rtl"] .cookie-consent-toggle input:checked + .cookie-consent-toggle-slider:before {
    transform: translateX(-24px);
}

[dir="rtl"] .cookie-consent-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .cookie-consent-content {
    text-align: right;
}

[dir="rtl"] .cookie-consent-text {
    text-align: right;
}

[dir="rtl"] .cookie-consent-category {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .cookie-consent-category-description {
    text-align: right;
}

/* RTL адаптивность */
@media (max-width: 768px) {
    [dir="rtl"] .cookie-consent-header {
        flex-direction: column;
    }
    
    [dir="rtl"] .cookie-consent-actions {
        flex-direction: column;
    }
}

