/**
 * Custom Cookie Consent Styles
 * Plugin: Custom Cookie Consent
 * Version: 1.0.0
 */

/* Основной контейнер cookie consent */
.ccc-cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    max-width: 460px;
    min-width: 300px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    pointer-events: none;
}

/* Анимация появления */
.ccc-cookie-consent.ccc-show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Контент */
.ccc-cookie-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Заголовок */
.ccc-cookie-message h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: inherit;
    line-height: 1.3;
}

/* Текст сообщения */
.ccc-cookie-message p {
    margin: 0;
    color: inherit;
    font-size: 14px;
    line-height: 1.5;
}

/* Ссылки в сообщении */
.ccc-cookie-message a {
    color: #0073aa;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.ccc-cookie-message a:hover {
    color: #005a87;
    text-decoration: none;
}

/* Контейнер кнопок */
.ccc-cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Стили кнопок */
.ccc-btn {
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    white-space: nowrap;
    outline: none;
    position: relative;
    overflow: hidden;
}

/* Кнопка "Принять все" */
.ccc-btn-accept {
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
}

.ccc-btn-accept:hover {
    background-color: #005a87;
    border-color: #005a87;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.ccc-btn-accept:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.ccc-btn-accept:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 115, 170, 0.3);
}

/* Кнопка "Отклонить" */
.ccc-btn-reject {
    background-color: transparent;
    color: #333333;
    border-color: #cccccc;
}

.ccc-btn-reject:hover {
    background-color: #f8f9fa;
    border-color: #999999;
    color: #333333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ccc-btn-reject:focus {
    outline: 2px solid #cccccc;
    outline-offset: 2px;
}

.ccc-btn-reject:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .ccc-cookie-consent {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        min-width: auto;
        padding: 16px;
        font-size: 13px;
    }
    
    .ccc-cookie-message h4 {
        font-size: 15px;
    }
    
    .ccc-cookie-buttons {
        gap: 8px;
    }
    
    .ccc-btn {
        padding: 12px 16px;
        font-size: 13px;
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .ccc-cookie-consent {
        bottom: 5px;
        left: 5px;
        right: 5px;
        padding: 14px;
    }
    
    .ccc-cookie-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .ccc-btn {
        width: 100%;
        padding: 14px 20px;
    }
}

/* Темная тема (если определена системная тема) */
@media (prefers-color-scheme: dark) {
    .ccc-cookie-consent {
        background-color: #2d2d2d;
        color: #ffffff;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }
    
    .ccc-btn-reject {
        background-color: transparent;
        color: #ffffff;
        border-color: #666666;
    }
    
    .ccc-btn-reject:hover {
        background-color: #3d3d3d;
        border-color: #888888;
        color: #ffffff;
    }
    
    .ccc-btn-reject:focus {
        outline-color: #666666;
    }
}

/* Анимация для плавного скрытия */
.ccc-cookie-consent.ccc-hide {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
}

/* Улучшение доступности */
@media (prefers-reduced-motion: reduce) {
    .ccc-cookie-consent,
    .ccc-btn {
        transition: none;
    }
}

/* Стили для печати */
@media print {
    .ccc-cookie-consent {
        display: none !important;
    }
}

/* Дополнительные утилитарные классы */
.ccc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Анимация загрузки */
.ccc-loading {
    pointer-events: none;
    opacity: 0.6;
}

.ccc-loading .ccc-btn {
    cursor: not-allowed;
}

/* Индикатор фокуса для улучшенной доступности */
.ccc-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Стили для high contrast mode */
@media (prefers-contrast: high) {
    .ccc-cookie-consent {
        border: 2px solid currentColor;
    }
    
    .ccc-btn {
        border-width: 3px;
    }
}
