/* Основной контейнер модалки */
.cookie-settings-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 0;
    padding: 0;
    width: 100%;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.cookie-settings-popup.open {
    display: flex;
}

.cookie-settings-wrapper {
    background: var(--backgroundColor);
    border-radius: var(--rounding);
    padding: 30px;
    display: flex;
    flex-direction: column;
    max-height: 90%;
    max-width: 600px;
    color: var(--textColor);
}

.cookie-settings-close {
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.cookie-settings-popup .cookie-settings-close {
  display: flex;
}

.cookie-settings-close:hover {
    background: #f1f3f5;
}

.cookie-settings-close svg {
    width: 20px;
    height: 20px;
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    flex: 0 0 auto;
    padding-bottom: 15px;
    flex-direction: column;
    gap: 15px;
}

.cookie-settings-footer {
    flex: 0 0 auto;
    padding-top: 15px;
    display: flex;
    justify-content: flex-end;
}

/* Форма настроек */
.cookie-settings-form {
    flex: 1 1 auto;
    position: relative;
    overflow: auto;
    display: flex;
    flex-direction: column;
}

/* Заголовок */
.cookie-settings-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

/* Описание */
.cookie-settings-form-description {
    font-size: 14px;
    color: var(--descriptionTextColor);
    line-height: 1.6;
    padding: 12px 16px;
    background: var(--descriptionBackgroundColor);
    border-radius: var(--rounding);
}

.cookie-settings-footer .cookie-settings-form-description {
  display: none;
}

/* Элементы настроек */
.cookie-settings-element {
    padding: 10px 0;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 0;
    border-bottom:  1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.cookie-settings-element:last-of-type {
    border-bottom: none;
}
.cookie-settings-element_disabled *,
.cookie-settings-element_disabled {
    cursor: auto;
}

.cookie-settings-top {
    display: flex;
    justify-content: space-between;
    align-items: top;
}




.cookie-settings-element-setting {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

.cookie-settings-element-label {
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* Описание элемента */
.cookie-settings-element-description {
    font-size: 13px;
    color: var(--groupDescriptionTextColor);
    line-height: 1.5;
}

/* Стилизация чекбоксов */
.cookie-settings-element-label-input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 24px;
    border-radius: var(--switcherRounding);
    background: var(--nonActiveSwitcherColor);
    position: relative;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    margin: 0;
    flex: 0 0 auto;
}

.cookie-settings-element-label-input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--nonActiveSwitcherSliderColor);
    border-radius: var(--switcherSliderRounding);
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-settings-element-label-input[type="checkbox"]:checked {
    background: var(--activeSwitcherColor);
}

.cookie-settings-element-label-input[type="checkbox"]:checked::before {
    transform: translateX(20px);
    background: var(--activeSwitcherSliderColor);
}

.cookie-settings-element-label-input[type="checkbox"]:disabled {
    background: var(--disableSwitcherColor);
    cursor: not-allowed;
}

.cookie-settings-element-label-input[type="checkbox"]:disabled::before {
    background: var(--disableSwitcherSliderColor);
}

/* Контейнер для кнопки */
.cookie-settings-actions {
    margin-top: 25px;
    text-align: center;
}

/* Кнопка применить */
.cookie-settings-form-apply-button {
    background: var(--buttonBackgroundColor);
    color: var(--buttonTextColor);
    border: none;
    padding: 5px 25px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--buttonsRounding);
    cursor: pointer;
    text-transform: none;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.cookie-settings-form-apply-button:hover {
    transform: translateY(-2px);
}

.cookie-settings-form-apply-button:active {
    transform: translateY(0);
}

/* Анимация появления */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Адаптивность */
@media (max-width: 600px) {
    .cookie-settings-wrapper {
        padding: 20px;
    }
    .cookie-settings-popup {
        padding: 10px;
    }
    
    .cookie-settings-title {
        font-size: 20px;
    }
    
    .cookie-settings-element {
        padding: 12px;
    }
    
    .cookie-settings-element-setting {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
}

.cookie-settings-alert {
    position: fixed;
    bottom: var(--bottom);
    left: var(--left);
    right: var(--right);
    top: var(--top);
    z-index: 9998;
    transform: var(--transform);
    display: none;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: var(--backgroundColor);
    box-shadow: 0px 6px 14px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    width: 100%;
    max-width: var(--maxWidth);
}

.cookie-settings-alert-left {
    font-size: 14px;
    line-height: 1.6;
    color: #333333;
    text-align: left;
}

.cookie-settings-alert-left a {
    color: var(--accent-color,#2879fe);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-settings-alert-left a:hover {
    color: var(--accent-color,#2879fe);
    text-decoration: none;
}

.cookie-settings-alert-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    flex-direction: row-reverse;
}

.cookie-settings-alert-right button {
    color: var(--acceptButtonTextColor);
    border: none;
    padding: 5px 25px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.cookie-settings-alert-right button:first-child {
    background: var(--acceptButtonBackgroundColor);
    color: var(--acceptButtonTextColor);
}

.cookie-settings-alert-right button:first-child:hover {
    background: var(--acceptButtonBackgroundColor);
    opacity: 0.9;
}

.cookie-settings-alert-right button:first-child:active {
    transform: translateY(1px);
}

.cookie-settings-alert-right .cookie-settings-open-popup-button {
    background: var(--configureButtonBackgroundColor);
    color: var(--configureButtonTextColor);
}

.cookie-settings-alert-right .cookie-settings-open-popup-button:hover {
    background: var(--configureButtonBackgroundColor);
    opacity: 0.9;
}

.cookie-settings-alert-right .cookie-settings-open-popup-button:active {
    transform: translateY(1px);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 1200px) {
    .cookie-settings-alert {
        padding: 20px;
        gap: 15px;
        left: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        transform: none;
        flex-direction: row;
        border-radius: 0;
    }
    
    .cookie-settings-alert-right {
        flex-direction: column;
    }
    
    .cookie-settings-alert-right button {
        width: 100%;
    }
}

/* Адаптивность для планшетов */
@media (max-width: 550px) {
    .cookie-settings-alert-left {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .cookie-settings-alert {
        flex-direction: column;
    }
    .cookie-settings-alert-left {
        text-align: center;
    }
    .cookie-settings-alert-right {
        flex-direction: row-reverse;
        width: 100%;
    }
    .cookie-settings-alert-right .cookie-settings-open-popup-button {
        justify-content: center;
    }
}

/* Альтернативный вариант с эффектом пружины */
.cookie-settings-button-open {
    position: fixed;
    bottom: var(--bottom);
    left: var(--left);
    top: var(--top);
    right: var(--right);
    z-index: 9998;
    display: none;
    align-items: center;
    padding: 12px;
    background: var(--background);
    border: 1px solid var(--borderColor);
    border-radius: var(--rounding);
    cursor: pointer;
    width: 48px;
    height: 48px;
    overflow: hidden;
    white-space: nowrap;
    outline: none;
}

.cookie-settings-button-open span {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateX(-30px) scale(0.8);
    max-width: 0;
    overflow: hidden;
    margin-right: 0;
}

.cookie-settings-button-open svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-settings-button-open:hover {
    width: auto;
    border-radius: 24px;
    transition: all 0.6s cubic-bezier(0.8, 0.01, 0.27, 1.55);
}

.cookie-settings-button-open:hover span {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-width: 150px;
    margin-right: 10px;
    transition: all 0.6s cubic-bezier(0.8, 0.01, 0.27, 1.55) 0.15s;
}

.cookie-settings-button-open:hover svg {
    transform: rotate(45deg) scale(1.1);
    transition: all 0.6s cubic-bezier(0.8, 0.01, 0.27, 1.55) 0.15s;
}