/* ========================================
   Cookie Banner Styles - Modular Component
   ======================================== */

:root {
    --cookie-banner-accent: #764BA2;
    --cookie-banner-accent-hover: #342248;
}

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 90%;
    max-width: 500px;
    background-color: #ffffff;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    padding: 30px 20px;
    z-index: 9999;
    display: none;
    animation: slideUp 0.4s ease-out;
    border-radius: 8px;
}

.cookie-banner.active {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(calc(100% + 20px));
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner__container {
    max-width: 500px;
    margin: 0 auto;
}

.cookie-banner__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #000000;
}

.cookie-banner__text {
    font-size: 14px;
    line-height: 1.6;
    color: #333333;
    margin-bottom: 20px;
}

.cookie-banner__checkboxes {
    margin-bottom: 20px;
}

.cookie-banner__checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.cookie-banner__checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--cookie-banner-accent);
}

.cookie-banner__checkbox-item input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-banner__checkbox-item label {
    font-size: 15px;
    color: var(--cookie-banner-accent);
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.cookie-banner__checkbox-item label svg {
    margin-right: 8px;
    width: 20px;
    height: 20px;
}

.cookie-banner__checkbox-item--disabled label {
    cursor: not-allowed;
}

.cookie-banner__buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-banner__button {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.cookie-banner__button--accept-all {
    background-color: var(--cookie-banner-accent);
    color: #ffffff;
}

.cookie-banner__button--accept-all:hover {
    background-color: var(--cookie-banner-accent-hover);
}

.cookie-banner__button--necessary {
    background-color: var(--cookie-banner-accent);
    color: #ffffff;
}

.cookie-banner__button--necessary:hover {
    background-color: var(--cookie-banner-accent-hover);
}

.cookie-banner__button--options {
    background-color: var(--cookie-banner-accent);
    color: #ffffff;
}

.cookie-banner__button--options:hover {
    background-color: var(--cookie-banner-accent-hover);
}

.cookie-banner__footer {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 13px;
}

.cookie-banner__footer a {
    color: #666666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cookie-banner__footer a:hover {
    color: var(--cookie-banner-accent);
}

/* Cookie Options Panel */
.cookie-options-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.cookie-options-panel.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-options-panel__content {
    background-color: #ffffff;
    border-radius: 8px;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    animation: slideInDown 0.3s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

@keyframes slideInDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-options-panel__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #666666;
    line-height: 1;
    padding: 5px;
    transition: color 0.3s ease;
}

.cookie-options-panel__close:hover {
    color: #000000;
}

.cookie-options-panel__title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000000;
}

.cookie-options-panel__subtitle {
    font-size: 14px;
    color: #666666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.cookie-category {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 20px;
    overflow: hidden;
}

.cookie-category__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cookie-category__header:hover {
    background-color: #f0f0f0;
}

.cookie-category__header-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.cookie-category__icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    color: var(--cookie-banner-accent);
}

.cookie-category__name {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}

.cookie-category__header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cookie-category__toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.cookie-category__toggle input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-category__toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.cookie-category__toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cookie-category__toggle input:checked + .cookie-category__toggle-slider {
    background-color: var(--cookie-banner-accent);
}

.cookie-category__toggle input:checked + .cookie-category__toggle-slider:before {
    transform: translateX(24px);
}

.cookie-category__toggle input:disabled + .cookie-category__toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-category__expand {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666666;
    transition: transform 0.3s ease;
    padding: 5px;
}

.cookie-category.expanded .cookie-category__expand {
    transform: rotate(180deg);
}

.cookie-category__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.cookie-category.expanded .cookie-category__body {
    max-height: 500px;
}

.cookie-category__description {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #555555;
    background-color: #ffffff;
}

.cookie-category__info-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.cookie-category__info-label {
    font-weight: 600;
    color: #333333;
    font-size: 13px;
}

.cookie-category__info-value {
    color: #666666;
    font-size: 13px;
}

.cookie-options-panel__actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.cookie-options-panel__button {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.cookie-options-panel__button--save {
    background-color: var(--cookie-banner-accent);
    color: #ffffff;
}

.cookie-options-panel__button--save:hover {
    background-color: var(--cookie-banner-accent-hover);
}

.cookie-options-panel__button--accept-all {
    background-color: var(--cookie-banner-accent);
    color: #ffffff;
}

.cookie-options-panel__button--accept-all:hover {
    background-color: var(--cookie-banner-accent-hover);
}

.cookie-options-panel__button--reject-all {
    background-color: #666666;
    color: #ffffff;
}

.cookie-options-panel__button--reject-all:hover {
    background-color: #555555;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 20px 15px;
    }
    
    .cookie-banner__title {
        font-size: 20px;
    }
    
    .cookie-banner__text {
        font-size: 13px;
    }

    .cookie-options-panel__content {
        padding: 30px 20px;
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .cookie-options-panel__title {
        font-size: 22px;
        padding-right: 30px;
    }

    .cookie-options-panel__actions {
        flex-direction: column;
    }

    .cookie-category__info-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .cookie-category__info-label {
        font-weight: 700;
    }
}
