/* Cookie ФЗ-152 Banner Styles */

.cookie-fz152-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 999999;
    padding: 0;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.cookie-fz152-position-bottom {
    bottom: 0;
}

.cookie-fz152-position-top {
    top: 0;
}

.cookie-fz152-position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    background: transparent;
}

.cookie-fz152-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-fz152-position-center .cookie-fz152-content {
    max-width: 600px;
}

.cookie-fz152-title {
    margin: 0;
    color: inherit;
}

.cookie-fz152-description {
    margin: 0;
    color: inherit;
    opacity: 0.9;
}

.cookie-fz152-categories {
    margin: 0;
}

.cookie-fz152-category {
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cookie-fz152-category:last-child {
    border-bottom: none;
}

.cookie-fz152-category-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: 8px;
    position: relative;
}

.cookie-fz152-category-title {
    color: inherit;
    flex-grow: 1;
}

.cookie-fz152-category-desc {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: inherit;
    opacity: 0.8;
}

/* Скрываем стандартный чекбокс, но оставляем функциональным */
.cookie-fz152-toggle,
.cookie-fz152-modal-toggle {
    position: absolute;
    opacity: 0;
    width: 50px;
    height: 26px;
    top: 0;
    left: auto;
    right: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.cookie-fz152-toggle:disabled,
.cookie-fz152-modal-toggle:disabled {
    cursor: not-allowed;
}

/* Стили для переключателя (слайдера) */
.cookie-fz152-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    background-color: #ccc;
    border-radius: 13px;
    transition: background-color 0.3s;
    vertical-align: middle;
    margin-left: 10px;
    flex-shrink: 0;
}

.cookie-fz152-switch::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Исправленные селекторы для работы с .cookie-fz152-toggle */
.cookie-fz152-toggle:checked + .cookie-fz152-switch {
    background-color: #2b61ba;
}

.cookie-fz152-toggle:checked + .cookie-fz152-switch::before {
    transform: translateX(24px);
}

/* Для disabled переключателей */
.cookie-fz152-toggle:disabled + .cookie-fz152-switch {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Селекторы для модалки */
.cookie-fz152-modal-toggle:checked + .cookie-fz152-switch {
    background-color: #2b61ba;
}

.cookie-fz152-modal-toggle:checked + .cookie-fz152-switch::before {
    transform: translateX(24px);
}

.cookie-fz152-modal-toggle:disabled + .cookie-fz152-switch {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-fz152-buttons {
    display: flex;
    gap: 0;
    margin-top: 0;
    flex-wrap: wrap;
}

.cookie-fz152-btn {
    padding: 0;
    border: none;
    border-radius: 0;
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.cookie-fz152-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.cookie-fz152-btn:active {
    transform: translateY(0);
}

.cookie-fz152-btn-accept {
    flex: 1;
    min-width: 150px;
}

.cookie-fz152-btn-reject,
.cookie-fz152-btn-settings {
    flex: 0 0 auto;
}

.cookie-fz152-privacy {
    margin: 0;
    font-size: 13px;
    text-align: center;
}

.cookie-fz152-privacy a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.8;
}

.cookie-fz152-privacy a:hover {
    opacity: 1;
}

/* Settings Link */
.cookie-fz152-settings-link {
    position: fixed;
    z-index: 999998;
}

.cookie-fz152-link-bottom-left,
.cookie-fz152-link-bottom-right {
    bottom: 0;
    left: auto;
    right: auto;
}

.cookie-fz152-link-footer {
    position: static;
    display: inline-block;
}

.cookie-fz152-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 0;
    font-size: inherit;
    line-height: 1.3;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cookie-fz152-link-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.cookie-fz152-link-icon {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.cookie-fz152-link-text {
    white-space: nowrap;
}

.cookie-fz152-link-btn-icon-only .cookie-fz152-link-icon {
    margin: 0;
}

/* Modal */
.cookie-fz152-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-fz152-modal.active {
    opacity: 1;
    visibility: visible;
}

.cookie-fz152-modal-content {
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 0;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-fz152-modal.active .cookie-fz152-modal-content {
    transform: scale(1);
}

.cookie-fz152-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
}

.cookie-fz152-close:hover {
    color: #333;
}

.cookie-fz152-modal-categories {
    margin: 0;
}

.cookie-fz152-modal-buttons {
    margin-top: 0;
    text-align: right;
}

.cookie-fz152-btn-save {
    min-width: 150px;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-fz152-banner {
        padding: 15px;
    }
    
    .cookie-fz152-content {
        padding: 20px;
    }
    
    .cookie-fz152-buttons {
        flex-direction: column;
    }
    
    .cookie-fz152-btn {
        width: 100%;
    }
    
    .cookie-fz152-modal-content {
        padding: 20px;
        margin: 10px;
    }
    
    .cookie-fz152-position-center {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .cookie-fz152-category-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cookie-fz152-link-bottom-left,
    .cookie-fz152-link-bottom-right {
        left: 15px;
        right: 15px;
        bottom: 15px;
    }
    
    .cookie-fz152-link-btn {
        width: 100%;
    }
}

/* Animation for banner appearance */
@keyframes cookieFZ152SlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes cookieFZ152SlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-fz152-position-bottom.cookie-fz152-show {
    animation: cookieFZ152SlideUp 0.3s ease forwards;
}

.cookie-fz152-position-top.cookie-fz152-show {
    animation: cookieFZ152SlideDown 0.3s ease forwards;
}

.cookie-fz152-position-center.cookie-fz152-show {
    animation: cookieFZ152FadeIn 0.3s ease forwards;
}

@keyframes cookieFZ152FadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scrollbar for modal */
.cookie-fz152-modal-content::-webkit-scrollbar {
    width: 8px;
}

.cookie-fz152-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cookie-fz152-modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.cookie-fz152-modal-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}
