/**
 * OptimizedCookieManager Styles
 * Уникальные классы с префиксом ocm- для избежания конфликтов
 * Все стили с !important для гарантированного применения
 */

/* ===== БАЗОВЫЕ СТИЛИ ===== */
.ocm-banner {
    position: fixed !important;
    z-index: 999999 !important;
    max-width: 400px !important;
    min-width: 320px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #333333 !important;
    transform: translateY(100px) !important;
    opacity: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid #e5e5e5 !important;
    overflow: hidden !important;
}

.ocm-banner.ocm-show {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

/* ===== ПОЗИЦИОНИРОВАНИЕ ===== */
.ocm-position-bottom-right {
    bottom: 20px !important;
    right: 20px !important;
}

.ocm-position-bottom-left {
    bottom: 20px !important;
    left: 20px !important;
}

.ocm-position-bottom-center {
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(100px) !important;
}

.ocm-position-bottom-center.ocm-show {
    transform: translateX(-50%) translateY(0) !important;
}

.ocm-position-top-right {
    top: 20px !important;
    right: 20px !important;
    transform: translateY(-100px) !important;
}

.ocm-position-top-right.ocm-show {
    transform: translateY(0) !important;
}

/* ===== СОДЕРЖИМОЕ БАННЕРА ===== */
.ocm-banner-content,
.ocm-settings {
    padding: 24px !important;
}

.ocm-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px !important;
}

.ocm-title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
}

.ocm-close {
    background: none !important;
    border: none !important;
    font-size: 24px !important;
    color: #666666 !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

.ocm-close:hover {
    background: #f5f5f5 !important;
    color: #333333 !important;
}

.ocm-description {
    margin: 0 0 20px 0 !important;
    color: #666666 !important;
    line-height: 1.6 !important;
}

.ocm-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.ocm-btn {
    padding: 12px 20px !important;
    border-radius: 8px !important;
    border: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
    text-decoration: none !important;
    display: inline-block !important;
    font-family: inherit !important;
}

.ocm-btn-accept {
    background: #007bff !important;
    color: #ffffff !important;
}

.ocm-btn-accept:hover {
    background: #0056b3 !important;
    transform: translateY(-1px) !important;
}

.ocm-btn-reject {
    background: #6c757d !important;
    color: #ffffff !important;
}

.ocm-btn-reject:hover {
    background: #545b62 !important;
    transform: translateY(-1px) !important;
}

.ocm-btn-customize {
    background: transparent !important;
    color: #007bff !important;
    border: 2px solid #007bff !important;
}

.ocm-btn-customize:hover {
    background: #007bff !important;
    color: #ffffff !important;
}

.ocm-btn-save {
    background: #28a745 !important;
    color: #ffffff !important;
}

.ocm-btn-save:hover {
    background: #1e7e34 !important;
    transform: translateY(-1px) !important;
}

.ocm-back {
    background: none !important;
    border: none !important;
    color: #007bff !important;
    cursor: pointer !important;
    font-size: 14px !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
}

.ocm-back:hover {
    background: #f8f9fa !important;
}

/* ===== НАСТРОЙКИ COOKIE ===== */
.ocm-category {
    margin-bottom: 20px !important;
    padding: 16px !important;
    background: #f8f9fa !important;
    border-radius: 8px !important;
    border: 1px solid #e9ecef !important;
}

.ocm-category-header {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    margin-bottom: 8px !important;
}

.ocm-category-title {
    font-weight: 500 !important;
    color: #1a1a1a !important;
    font-size: 15px !important;
}

.ocm-category-desc {
    margin: 0 !important;
    color: #666666 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* ===== ПЕРЕКЛЮЧАТЕЛИ ===== */
.ocm-switch {
    position: relative !important;
    display: inline-block !important;
    width: 50px !important;
    height: 24px !important;
}

.ocm-switch input {
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.ocm-slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #ccc !important;
    border-radius: 24px !important;
    transition: all 0.3s ease !important;
}

.ocm-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 18px !important;
    width: 18px !important;
    left: 3px !important;
    bottom: 3px !important;
    background-color: white !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

input:checked + .ocm-slider {
    background-color: #007bff !important;
}

input:checked + .ocm-slider:before {
    transform: translateX(26px) !important;
}

input:disabled + .ocm-slider {
    background-color: #28a745 !important;
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

/* ===== КНОПКА ПЕРЕКЛЮЧЕНИЯ - БАЗОВЫЕ СТИЛИ ===== */
.ocm-toggle {
    position: fixed !important;
    width: 50px !important;
    height: 50px !important;
    border: none !important;
    color: white !important;
    font-size: 20px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 999998 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: inherit !important;
}

/* ===== ПОЗИЦИОНИРОВАНИЕ TOGGLE КНОПКИ ===== */
.ocm-toggle.ocm-toggle-position-bottom-right {
    bottom: 20px !important;
    right: 20px !important;
}

.ocm-toggle.ocm-toggle-position-bottom-left {
    bottom: 20px !important;
    left: 20px !important;
}

.ocm-toggle.ocm-toggle-position-top-right {
    top: 20px !important;
    right: 20px !important;
}

.ocm-toggle.ocm-toggle-position-top-left {
    top: 20px !important;
    left: 20px !important;
}

.ocm-toggle.ocm-toggle-position-center-left {
    top: 50% !important;
    left: 20px !important;
    transform: translateY(-50%) !important;
}

.ocm-toggle.ocm-toggle-position-center-right {
    top: 50% !important;
    right: 20px !important;
    transform: translateY(-50%) !important;
}

/* ===== TOGGLE СТИЛЬ 1: КРУГЛАЯ КНОПКА ===== */
.ocm-toggle.ocm-toggle-style-1 {
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3) !important;
}

.ocm-toggle.ocm-toggle-style-1:hover {
    transform: scale(1.1) rotate(10deg) !important;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4) !important;
}

/* ===== TOGGLE СТИЛЬ 2: КВАДРАТНАЯ С СКРУГЛЕННЫМИ УГЛАМИ ===== */
.ocm-toggle.ocm-toggle-style-2 {
    border-radius: 15px !important;
    background: linear-gradient(45deg, #ff6b6b, #feca57) !important;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3) !important;
    width: 55px !important;
    height: 45px !important;
}

.ocm-toggle.ocm-toggle-style-2:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 40px rgba(255, 107, 107, 0.4) !important;
}

.ocm-toggle.ocm-toggle-style-2::before {
    content: "🍪" !important;
    font-size: 22px !important;
}

/* ===== TOGGLE СТИЛЬ 3: НЕОМОРФНЫЙ ДИЗАЙН ===== */
.ocm-toggle.ocm-toggle-style-3 {
    border-radius: 25px !important;
    background: #e0e5ec !important;
    color: #333 !important;
    box-shadow: 9px 9px 16px #a3b1c6, -9px -9px 16px #ffffff !important;
    width: 60px !important;
    height: 40px !important;
}

.ocm-toggle.ocm-toggle-style-3:hover {
    box-shadow: inset 9px 9px 16px #a3b1c6, inset -9px -9px 16px #ffffff !important;
    transform: scale(0.98) !important;
}

/* ===== TOGGLE СТИЛЬ 4: МИНИМАЛИСТИЧНЫЙ ===== */
.ocm-toggle.ocm-toggle-style-4 {
    border-radius: 8px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    width: 45px !important;
    height: 45px !important;
    font-size: 18px !important;
}

.ocm-toggle.ocm-toggle-style-4:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* ===== TOGGLE СТИЛЬ 5: ЯРКИЙ ГРАДИЕНТ ===== */
.ocm-toggle.ocm-toggle-style-5 {
    border-radius: 50% !important;
    background: conic-gradient(from 0deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ff6b6b) !important;
    animation: ocm-rotate 4s linear infinite !important;
    width: 52px !important;
    height: 52px !important;
}

.ocm-toggle.ocm-toggle-style-5:hover {
    animation-duration: 2s !important;
    transform: scale(1.05) !important;
}

@keyframes ocm-rotate {
    from { background-position: 0deg; }
    to { background-position: 360deg; }
}

/* ===== TOGGLE СТИЛЬ 6: СТЕКЛЯННЫЙ ЭФФЕКТ ===== */
.ocm-toggle.ocm-toggle-style-6 {
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #333 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.ocm-toggle.ocm-toggle-style-6:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-2px) !important;
}

/* ===== TOGGLE СТИЛЬ 7: ПУЛЬСИРУЮЩИЙ ===== */
.ocm-toggle.ocm-toggle-style-7 {
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    animation: ocm-pulse 2s ease-in-out infinite alternate !important;
}

.ocm-toggle.ocm-toggle-style-7:hover {
    animation: none !important;
    transform: scale(1.1) !important;
}

@keyframes ocm-pulse {
    from {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    to {
        box-shadow: 0 0 0 20px rgba(102, 126, 234, 0);
    }
}

/* ===== TOGGLE СТИЛЬ 8: КОРПОРАТИВНЫЙ ===== */
.ocm-toggle.ocm-toggle-style-8 {
    border-radius: 6px !important;
    background: #2c3e50 !important;
    border: 2px solid #34495e !important;
    width: 48px !important;
    height: 48px !important;
    font-weight: bold !important;
}

.ocm-toggle.ocm-toggle-style-8:hover {
    background: #34495e !important;
    border-color: #3498db !important;
    transform: translateY(-1px) !important;
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ ЭЛЕМЕНТЫ ===== */
.ocm-settings-buttons {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-top: 20px !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

.ocm-policy-link {
    color: #007bff !important;
    text-decoration: none !important;
    font-size: 13px !important;
    border-bottom: 1px solid transparent !important;
    transition: border-color 0.2s ease !important;
}

.ocm-policy-link:hover {
    border-bottom-color: #007bff !important;
}

/* ===== ТЕМА: MINIMAL ===== */
.ocm-theme-minimal {
    border-radius: 4px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e0e0e0 !important;
}

.ocm-theme-minimal .ocm-btn {
    border-radius: 4px !important;
    font-weight: 400 !important;
}

.ocm-theme-minimal .ocm-btn-accept {
    background: #000000 !important;
}

.ocm-theme-minimal .ocm-btn-accept:hover {
    background: #333333 !important;
}

.ocm-theme-minimal .ocm-btn-customize {
    border-color: #000000 !important;
    color: #000000 !important;
}

.ocm-theme-minimal .ocm-btn-customize:hover {
    background: #000000 !important;
}

/* ===== ТЕМА: MODERN ===== */
.ocm-theme-modern {
    border-radius: 16px !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1) !important;
}

.ocm-theme-modern .ocm-btn {
    border-radius: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 12px !important;
}

.ocm-theme-modern .ocm-btn-accept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.ocm-theme-modern .ocm-btn-accept:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3) !important;
}

/* ===== ТЕМА: ROUNDED ===== */
.ocm-theme-rounded {
    border-radius: 24px !important;
    background: #ffffff !important;
    border: 2px solid #f0f0f0 !important;
}

.ocm-theme-rounded .ocm-btn {
    border-radius: 20px !important;
    padding: 14px 24px !important;
}

.ocm-theme-rounded .ocm-btn-accept {
    background: #ff6b6b !important;
}

.ocm-theme-rounded .ocm-btn-accept:hover {
    background: #ff5252 !important;
}

.ocm-theme-rounded .ocm-category {
    border-radius: 16px !important;
}

/* ===== ТЕМА: GLASS ===== */
.ocm-theme-glass {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
}

.ocm-theme-glass .ocm-btn {
    backdrop-filter: blur(10px) !important;
    border-radius: 10px !important;
}

.ocm-theme-glass .ocm-btn-accept {
    background: rgba(0, 123, 255, 0.9) !important;
}

.ocm-theme-glass .ocm-category {
    background: rgba(248, 249, 250, 0.6) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* ===== ТЕМА: GRADIENT ===== */
.ocm-theme-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 20px !important;
}

.ocm-theme-gradient .ocm-title,
.ocm-theme-gradient .ocm-description,
.ocm-theme-gradient .ocm-category-title,
.ocm-theme-gradient .ocm-category-desc {
    color: #ffffff !important;
}

.ocm-theme-gradient .ocm-close {
    color: #ffffff !important;
}

.ocm-theme-gradient .ocm-close:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

.ocm-theme-gradient .ocm-btn-accept {
    background: #ffffff !important;
    color: #667eea !important;
}

.ocm-theme-gradient .ocm-btn-accept:hover {
    background: #f8f9fa !important;
}

.ocm-theme-gradient .ocm-btn-reject {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.ocm-theme-gradient .ocm-btn-reject:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.ocm-theme-gradient .ocm-btn-customize {
    background: transparent !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

.ocm-theme-gradient .ocm-btn-customize:hover {
    background: #ffffff !important;
    color: #667eea !important;
}

.ocm-theme-gradient .ocm-category {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.ocm-theme-gradient input:checked + .ocm-slider {
    background-color: #ffffff !important;
}

.ocm-theme-gradient input:checked + .ocm-slider:before {
    background-color: #667eea !important;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 480px) {
    .ocm-banner {
        max-width: calc(100vw - 40px) !important;
        min-width: calc(100vw - 40px) !important;
    }
    
    .ocm-buttons {
        flex-direction: column !important;
    }
    
    .ocm-settings-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .ocm-category-header {
        flex-wrap: wrap !important;
    }
}

/* ===== АНИМАЦИИ ===== */
@keyframes ocm-slideUp {
    from {
        transform: translateY(100%) !important;
        opacity: 0 !important;
    }
    to {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }
}

@keyframes ocm-fadeIn {
    from {
        opacity: 0 !important;
    }
    to {
        opacity: 1 !important;
    }
}

/* ===== ТЕМНАЯ ТЕМА (медиазапрос) ===== */
@media (prefers-color-scheme: dark) {
    .ocm-banner:not(.ocm-theme-gradient):not(.ocm-theme-glass) {
        background: #2d3748 !important;
        border-color: #4a5568 !important;
        color: #ffffff !important;
    }
    
    .ocm-banner:not(.ocm-theme-gradient) .ocm-title,
    .ocm-banner:not(.ocm-theme-gradient) .ocm-category-title {
        color: #ffffff !important;
    }
    
    .ocm-banner:not(.ocm-theme-gradient) .ocm-description,
    .ocm-banner:not(.ocm-theme-gradient) .ocm-category-desc {
        color: #cbd5e0 !important;
    }
    
    .ocm-banner:not(.ocm-theme-gradient) .ocm-category {
        background: #1a202c !important;
        border-color: #4a5568 !important;
    }
    
    .ocm-banner:not(.ocm-theme-gradient) .ocm-close {
        color: #cbd5e0 !important;
    }
    
    .ocm-banner:not(.ocm-theme-gradient) .ocm-close:hover {
        background: #4a5568 !important;
        color: #ffffff !important;
    }
}
