/* Базовые стили для Simple Cookie Consent */
.scc-cookie-consent {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    
    transition: transform 0.3s ease-in-out;
}

.scc-cookie-consent.scc-hidden {
    transform: translateY(100%);
}

.scc-cookie-content {
    background: var(--scc-background, #1a1a1a);
    color: var(--scc-text-color, #ffffff);
    
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.scc-cookie-text {
    margin: 0;
    flex: 1;
    min-width: 250px;
    font-size: 0.9em;
}

.scc-cookie-accept {
    font-family: inherit;
    font-size: inherit;
    
    background: var(--scc-button-background, #007cba);
    color: var(--scc-button-text, #ffffff);
    border: var(--scc-button-border, none);
    border-radius: var(--scc-button-radius, 4px);
    padding: var(--scc-button-padding, 0.5rem 1rem);
    cursor: pointer;
    transition: all 0.2s ease;
    
    appearance: none;
    -webkit-appearance: none;
}

.scc-cookie-accept:hover {
    background: var(--scc-button-hover-background, #005a87);
    color: var(--scc-button-hover-text, #ffffff);
}

.scc-cookie-accept:focus {
    outline: 2px solid var(--scc-button-focus-outline, #007cba);
    outline-offset: 2px;
}

/* Десктопная версия - обычное поведение */
@media (min-width: 769px) {
    .scc-cookie-consent {
        /* На десктопе оставляем как есть */
    }
}

/* Мобильная версия - прилипание к видимой области */
@media (max-width: 768px) {
    .scc-cookie-consent {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999;
        
        /* Плавное появление */
        animation: scc-slide-up 0.3s ease-out;
    }
    
    .scc-cookie-content {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        
        /* Градиент для лучшего визуального отделения */
        background: linear-gradient(
            to top,
            var(--scc-background, #1a1a1a) 0%,
            var(--scc-background, #1a1a1a) 90%,
            transparent 100%
        );
    }
    
    .scc-cookie-text {
        min-width: auto;
        margin-bottom: 1rem;
        font-size: 0.9em;
        line-height: 1.4;
    }
    
    .scc-cookie-accept {
        width: 100%;
        max-width: 200px;
        padding: 0.75rem 1rem;
        font-size: 1em;
        font-weight: 600;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .scc-cookie-content {
        padding: 1.2rem 0.8rem;
    }
    
    .scc-cookie-text {
        font-size: 0.85em;
        margin-bottom: 0.8rem;
    }
    
    .scc-cookie-accept {
        padding: 0.7rem 1rem;
        font-size: 0.95em;
    }
}

/* Планшеты в портретной ориентации */
@media (max-width: 1024px) and (min-width: 769px) {
    .scc-cookie-content {
        max-width: 90%;
        margin: 0 auto;
    }
}

/* Анимация появления */
@keyframes scc-slide-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Поддержка безопасных зон для iPhone X и новее */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .scc-cookie-content {
            padding-left: max(1rem, env(safe-area-inset-left));
            padding-right: max(1rem, env(safe-area-inset-right));
            padding-bottom: max(1rem, env(safe-area-inset-bottom));
        }
    }
}

/* Улучшение для темной/светлой темы */
@media (prefers-color-scheme: dark) {
    .scc-cookie-content {
        background: var(--scc-background, #2d2d2d);
        color: var(--scc-text-color, #ffffff);
    }
}

@media (prefers-color-scheme: light) {
    .scc-cookie-content {
        background: var(--scc-background, #ffffff);
        color: var(--scc-text-color, #333333);
        border-top: 1px solid #e0e0e0;
    }
}