/* Основной баннер */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #f8fafc;
    color: #002677;
    padding: 16px 24px;
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    margin: 20px;
    opacity: 1;
    border-radius: 8px;
    opacity: 0.9;
}

/* Текст в 2 строки с многоточием */
.cookie-text {
    flex: 1;
    min-width: 0;
    margin-right: 20px;
    line-height: 1.5;
    font-size: 15px;
    display: -webkit-box;
   line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cookie-text a{
    color: #002b88;
    text-decoration: underline;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Контейнер для кнопок */
.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Общий стиль кнопок */
.cookie-buttons button {
    padding: 10px 22px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

/* Кнопка настроек */
#settingsBtn {
    background: transparent;
    color: #002677;
    border: 1px solid #002677;
}

#settingsBtn:hover {
    background: #f1f5f9;
}

/* Основная кнопка */
#acceptBtn {
    color: #fff;
    background: #002677;
}

#acceptBtn:hover {
    background: #00319b;
}

/* Стили для модального окна */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cookie-modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 28px;
    width: 90%;
    max-width: 640px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content h2 {
    color: #002677;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 700;
}

.modal-description {
    color: #475569;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-description p {
    margin: 0 0 15px 0;
}

.more-info {
    color: #002677;
    text-decoration: none;
    font-size: 15px;
    display: inline-block;
    margin-top: 8px;
    font-weight: 500;
}

.more-info:hover {
    text-decoration: underline;
}

.allow-all-btn {
    background: #002677;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin: 20px 0;
    transition: background 0.3s;
    font-size: 16px;
}

.allow-all-btn:hover {
    background: #002e92;
}

.consent-section {
    margin: 30px 0 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 25px;
}

.section-header {
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 20px;
    color: #002677;
}

.accordion {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.accordion-item {
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    background: #fff;
    color: #1e293b;
    padding: 18px 20px;
    width: 100%;
    text-align: left;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
}

.accordion-header:hover {
    background: #f8fafc;
}

.accordion-icon {
    font-size: 18px;
    font-weight: bold;
    margin-left: 12px;
    color: #002677;
}

.accordion-header .accordion-icon {
    margin-right: 12px;
    font-size: 18px;
    font-weight: bold;
    min-width: 18px;
    display: inline-block;
    transition: transform 0.3s ease;
}



.accordion-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.accordion-content p {
    margin: 18px 0;
}

.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 0 4px;
}

.toggle-label {
    color: #334155;
    font-size: 15px;
    font-weight: 500;
    flex-grow: 1;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #00af54;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

input:disabled + .slider {
    background-color: #94a3b8;
    opacity: 0.7;
    cursor: not-allowed;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
}

.btn {
    min-width: 100%;
    padding: 12px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 20px;
}

.btn.secondary {
    background: white;
    color: #002677;
    border: 1px solid #c7d2fe;
}

.btn.secondary:hover {
    background: #eef2ff;
}

.btn.primary {
    background: #002677;
    color: white;
    border: none;
}

.btn.primary:hover {
    background: #002b88;
}


.hidden {
    display: none !important;
}

/* Новые стили для перемещения тумблеров */
.accordion-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
}

.accordion-title {
    flex-grow: 1;
    text-align: left;
}

.header-toggle {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vendors-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10002;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.vendors-modal:not(.hidden) {
    display: flex;
}

.vendors-container {
    background: #fff;
    padding: 28px;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-height: 85vh;
    overflow-y: auto;
}

.vendors-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #002677;
    font-size: 18px;
    font-weight: bold;
    padding: 5px;
}

.vendors-header h2 {
    flex-grow: 1;
    margin: 0;
    color: #1e293b;
}

.vendors-search {
    padding: 10px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    width: 100%;
    max-width: 300px;
}

.vendors-accordion {
    margin-top: 20px;
}

.vendor-category {
    border-bottom: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.vendor-category-header {
    background: none;
    padding: 16px 20px;
    width: 100%;
    text-align: left;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
}


.vendor-cookies-list {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: white;
}

.vendor-category.expanded .vendor-cookies-list {
    max-height: 100%;
}

.vendor-cookie {
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.vendor-cookie:last-child {
    border-bottom: none;
}

.vendor-cookie div {
    margin-bottom: 8px;
}

.vendor-cookie div:last-child {
    margin-bottom: 0;
}

.vendor-cookie strong {
    color: #334155;
    min-width: 100px;
    display: inline-block;
}

.view-vendors-btn {
    background: transparent;
    color: #002677;
    border: none;
    padding: 8px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-block;
    margin-top: 10px;
}

.view-vendors-btn:hover {
    color: #0033a0;
    text-decoration: underline;
}

@media (max-width: 992px) {
    .cookie-banner {
        padding: 14px 20px;
    }
    
    .modal-content {
        max-width: 90%;
        padding: 24px;
    }
    
    .modal-content h2 {
        font-size: 24px;
    }
    
    .accordion-header {
        padding: 14px 16px;
        font-size: 15px;
    }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {

        .accordion-header .accordion-icon {
        margin-right: 8px;
        font-size: 16px;
    }
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        margin: 10px;
    }
    
    .cookie-text {
        margin-right: 0;
        margin-bottom: 16px;
        min-width: 100%;
        line-clamp: 3;
        font-size: 14px;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: flex-end;
    }
    
    .cookie-buttons button {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .modal-content h2 {
        font-size: 22px;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        padding: 14px;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .cookie-banner {
        margin: 10px;
        padding: 12px 16px;
        border-radius: 6px;
    }
    
    .cookie-text {
        font-size: 13px;
        margin-bottom: 14px;
    }
    
    .cookie-buttons {
        width: 100%;
        gap: 8px;
    }
    
    .cookie-buttons button {
        padding: 8px 16px;
        font-size: 13px;
        flex: 1;
    }
    
    .modal-content {
        padding: 18px;
        border-radius: 10px;
    }
    
    .modal-content h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .modal-description {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .allow-all-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .section-header {
        font-size: 18px;
    }
    
    .toggle-label {
        font-size: 14px;
    }
}

/* Адаптация для 480px */
@media (max-width: 480px) {
    .cookie-banner {
        margin: 8px;
        padding: 10px 12px;
    }
    
    .cookie-text {
        line-clamp: 4;
        font-size: 12px;
    }
    
    .cookie-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    .cookie-buttons button {
        width: 100%;
        padding: 10px;
    }
    
    .modal-content {
        padding: 14px;
        max-height: 90vh;
    }
    
    .modal-content h2 {
        font-size: 18px;
    }
    
    .modal-description {
        font-size: 12px;
    }
    
    .accordion-header {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .toggle-switch {
        width: 42px;
        height: 24px;
    }
    
    .slider:before {
        height: 18px;
        width: 18px;
    }
    
    .btn {
        font-size: 16px;
        padding: 10px;
    }
    
    .vendors-container {
        padding: 20px;
    }
}