/* ===================================================================
 * Cookie Consent Banner & Sidebar Styles
 * =================================================================== */

/* Variables */
:root {
    --hhfeu-cookie-primary: #c60c30;
    --hhfeu-cookie-secondary: #2c2c2c;
    --hhfeu-cookie-light: #f5f5f5;
    --hhfeu-cookie-border: #e0e0e0;
    --hhfeu-cookie-text: #333;
    --hhfeu-cookie-text-light: #666;
    --hhfeu-cookie-white: #ffffff;
    --hhfeu-cookie-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --hhfeu-cookie-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================================================
 * COOKIE BANNER
 * =================================================================== */

.hhfeu-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: rgba(60, 60, 60, 0.95);
    border-top: 3px solid var(--hhfeu-cookie-primary);
    box-shadow: var(--hhfeu-cookie-shadow);
    animation: hhfeuCookieBannerSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: var(--hhfeu-cookie-transition);
}

.hhfeu-cookie-banner.hhfeu-cookie-banner--closing {
    animation: hhfeuCookieBannerSlideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

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

.hhfeu-cookie-banner__container {
    max-width: 85vw;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.hhfeu-cookie-banner__content {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

.hhfeu-cookie-banner__header {
    margin-bottom: 0;
}

.hhfeu-cookie-banner__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--hhfeu-cookie-white);
}

.hhfeu-cookie-banner__message {
    margin: 0;
    flex: 1;
}

.hhfeu-cookie-banner__message p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--hhfeu-cookie-white);
}

.hhfeu-cookie-banner__message a {
    color: var(--hhfeu-cookie-white);
    text-decoration: underline;
}

.hhfeu-cookie-banner__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .hhfeu-cookie-banner__content {
        flex-direction: column;
        align-items: flex-start;
    }

    .hhfeu-cookie-banner__buttons {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .hhfeu-cookie-banner__content {
        flex-direction: column;
        gap: 1rem;
    }

    .hhfeu-cookie-banner__buttons {
        width: 100%;
        flex-direction: column;
        justify-content: stretch;
    }

    .hhfeu-cookie-banner__buttons .hhfeu-cookie-btn {
        width: 100%;
    }
}

/* ===================================================================
 * COOKIE BUTTONS
 * =================================================================== */

.hhfeu-cookie-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--hhfeu-cookie-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.hhfeu-cookie-btn:focus {
    outline: 2px solid var(--hhfeu-cookie-primary);
    outline-offset: 2px;
}

/* Primary Button */
.hhfeu-cookie-btn--primary {
    background-color: var(--hhfeu-cookie-primary);
    color: var(--hhfeu-cookie-white);
}

.hhfeu-cookie-btn--primary:hover {
    background-color: #a60927;
    box-shadow: 0 2px 8px rgba(198, 12, 48, 0.3);
}

.hhfeu-cookie-btn--primary:active {
    transform: scale(0.98);
}

/* Secondary Button */
.hhfeu-cookie-btn--secondary {
    background-color: var(--hhfeu-cookie-secondary);
    color: var(--hhfeu-cookie-white);
}

.hhfeu-cookie-btn--secondary:hover {
    background-color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Tertiary Button */
.hhfeu-cookie-btn--tertiary {
    background-color: transparent;
    color: var(--hhfeu-cookie-white);
    border: 1px solid var(--hhfeu-cookie-white);
}

.hhfeu-cookie-btn--tertiary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--hhfeu-cookie-white);
}

/* Block Button */
.hhfeu-cookie-btn--block {
    width: 100%;
    display: flex;
}

/* ===================================================================
 * COOKIE SIDEBAR
 * =================================================================== */

.hhfeu-cookie-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    animation: hhfeuCookieSidebarFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hhfeu-cookie-sidebar.hhfeu-cookie-sidebar--closing {
    animation: hhfeuCookieSidebarFadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

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

.hhfeu-cookie-sidebar__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.hhfeu-cookie-sidebar__content {
    position: relative;
    left: 0;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    background-color: var(--hhfeu-cookie-white);
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: hhfeuCookieSidebarSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
}

.hhfeu-cookie-sidebar.hhfeu-cookie-sidebar--closing .hhfeu-cookie-sidebar__content {
    animation: hhfeuCookieSidebarSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes hhfeuCookieSidebarSlideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes hhfeuCookieSidebarSlideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

.hhfeu-cookie-sidebar__header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--hhfeu-cookie-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.hhfeu-cookie-sidebar__header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hhfeu-cookie-text);
}

.hhfeu-cookie-sidebar__close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--hhfeu-cookie-text);
    padding: 0.5rem;
    margin: -0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hhfeu-cookie-transition);
}

.hhfeu-cookie-sidebar__close-btn:hover {
    color: var(--hhfeu-cookie-primary);
}

.hhfeu-cookie-sidebar__intro {
    padding: 1.5rem;
    border-bottom: 1px solid var(--hhfeu-cookie-border);
}

.hhfeu-cookie-sidebar__intro p {
    margin: 0 0 1rem 0;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.hhfeu-cookie-sidebar__intro p:last-child {
    margin-bottom: 0;
}

.hhfeu-cookie-sidebar__intro a {
    color: var(--hhfeu-cookie-primary);
    text-decoration: underline;
    font-weight: 600;
}

.hhfeu-cookie-sidebar__intro a:hover {
    text-decoration: none;
}

.hhfeu-cookie-sidebar__body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
}

.hhfeu-cookie-sidebar__footer {
    padding: 1.5rem;
    border-top: 1px solid var(--hhfeu-cookie-border);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* ===================================================================
 * COOKIE CATEGORIES
 * =================================================================== */

.hhfeu-cookie-category {
    margin-bottom: 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--hhfeu-cookie-border);
}

.hhfeu-cookie-category:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.hhfeu-cookie-category__header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.hhfeu-cookie-category__expand-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--hhfeu-cookie-transition);
}

.hhfeu-cookie-category__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--hhfeu-cookie-primary);
    transition: var(--hhfeu-cookie-transition);
    transform: rotate(0deg);
}

.hhfeu-cookie-category.hhfeu-cookie-category--expanded .hhfeu-cookie-category__arrow {
    transform: rotate(90deg);
}

.hhfeu-cookie-category__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--hhfeu-cookie-text);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
    line-height: 1.2;
}

.hhfeu-cookie-badge {
    display: inline-block;
    background-color: var(--hhfeu-cookie-primary);
    color: var(--hhfeu-cookie-white);
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.hhfeu-cookie-category__content {
    margin-top: 1rem;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.hhfeu-cookie-category.hhfeu-cookie-category--expanded .hhfeu-cookie-category__content {
    max-height: 1000px;
    opacity: 1;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}

.hhfeu-cookie-category__content p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.6;
}

/* ===================================================================
 * COOKIE TOGGLE SWITCH
 * =================================================================== */

.hhfeu-cookie-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.hhfeu-cookie-toggle input {
    display: none;
}

.hhfeu-cookie-toggle__slider {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: var(--hhfeu-cookie-border);
    border-radius: 12px;
    transition: var(--hhfeu-cookie-transition);
}

.hhfeu-cookie-toggle__slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: var(--hhfeu-cookie-white);
    border-radius: 50%;
    transition: var(--hhfeu-cookie-transition);
}

.hhfeu-cookie-toggle input:checked + .hhfeu-cookie-toggle__slider {
    background-color: var(--hhfeu-cookie-primary);
}

.hhfeu-cookie-toggle input:checked + .hhfeu-cookie-toggle__slider::before {
    transform: translateX(20px);
}

.hhfeu-cookie-toggle input:disabled + .hhfeu-cookie-toggle__slider {
    background-color: var(--hhfeu-cookie-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.hhfeu-cookie-toggle input:focus + .hhfeu-cookie-toggle__slider {
    box-shadow: 0 0 0 3px rgba(198, 12, 48, 0.1);
}

/* ===================================================================
 * RESPONSIVE
 * =================================================================== */

@media (max-width: 768px) {
    .hhfeu-cookie-banner__container {
        padding: 1rem;
    }

    .hhfeu-cookie-banner__buttons {
        flex-direction: column;
    }

    .hhfeu-cookie-btn {
        width: 100%;
    }

    .hhfeu-cookie-sidebar__content {
        max-width: 100%;
        animation: hhfeuCookieSidebarMobileSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .hhfeu-cookie-sidebar.hhfeu-cookie-sidebar--closing .hhfeu-cookie-sidebar__content {
        animation: hhfeuCookieSidebarMobileSlideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    @keyframes hhfeuCookieSidebarMobileSlideIn {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    @keyframes hhfeuCookieSidebarMobileSlideOut {
        from {
            transform: translateY(0);
        }
        to {
            transform: translateY(100%);
        }
    }
}

/* ===================================================================
 * UTILITY CLASSES
 * =================================================================== */

.hhfeu-cookie-hidden {
    display: none !important;
}

.hhfeu-cookie-transition-disabled * {
    transition: none !important;
}

/* Scrollbar styling for sidebar */
.hhfeu-cookie-sidebar__body::-webkit-scrollbar {
    width: 6px;
}

.hhfeu-cookie-sidebar__body::-webkit-scrollbar-track {
    background: transparent;
}

.hhfeu-cookie-sidebar__body::-webkit-scrollbar-thumb {
    background: var(--hhfeu-cookie-border);
    border-radius: 3px;
}

.hhfeu-cookie-sidebar__body::-webkit-scrollbar-thumb:hover {
    background: var(--hhfeu-cookie-text-light);
}

/* Print styles */
@media print {
    .hhfeu-cookie-banner,
    .hhfeu-cookie-sidebar {
        display: none !important;
    }
}
