/* === GLIDE Engineering - Cookie Banner Styles === */

/* === CSS Variables === */
:root {
    --primary-color: #1A1732;
    --accent-color: #EB068C;
    --white: #FFFFFF;
}

/* === Cookie Overlay === */
.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: all;
    cursor: pointer;
}

.cookie-overlay[style*="display: block"] {
    opacity: 1;
}

.cookie-overlay:hover {
    background-color: rgba(0, 0, 0, 0.55);
}

/* === Main Banner Container === */
.cookie-banner-light {
    position: fixed;
    bottom: clamp(0.75rem, 3vh, 1.5rem);
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 26rem);
    z-index: 9999;
    font-family: 'Montserrat', sans-serif;
    display: none;
    animation: slideUp 0.4s ease-out;
    perspective: 1000px;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.cookie-banner-light.flipped {
    transform: translateX(-50%);
}

.cookie-banner-light:not(.minimized) {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.cookie-banner-light[style*="display: block"] {
    display: block !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* === Animations === */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 1.5rem);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes minimizeIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes quickDismiss {
    to {
        opacity: 0;
        transform: translate(-50%, 1rem) scale(0.95);
    }
}

@keyframes hintFlip {
    0% { transform: perspective(300px) rotateY(0deg); }
    50% { transform: perspective(300px) rotateY(-10deg); }
    100% { transform: perspective(300px) rotateY(0deg); }
}

@keyframes fadeInNotification {
    to { opacity: 1; }
}

@keyframes pulseText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(1.25rem);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* === 3D Flip Container === */
.cookie-banner-flip-container {
    position: relative;
    width: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.cookie-banner-light.flipped .cookie-banner-flip-container {
    transform: rotateY(180deg);
}

/* === Banner States (Front & Back) === */
.cookie-banner-front,
.cookie-banner-back {
    width: 100%;
    background-color: rgba(26, 23, 50, 0.98);
    border: 2px solid rgba(235, 6, 140, 0.4);
    border-radius: clamp(0.5rem, 2vw, 0.75rem);
    padding: clamp(0.875rem, 3.5vh, 1.25rem) clamp(1rem, 4vw, 1.5rem);
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(235, 6, 140, 0.3),
                0 0 3rem rgba(235, 6, 140, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: box-shadow 0.3s ease;
}

.cookie-banner-front {
    position: relative;
    z-index: 2;
    transform: rotateY(0deg);
}

.cookie-banner-back {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: rotateY(180deg);
    z-index: 1;
    padding: clamp(0.5rem, 2vh, 0.875rem) clamp(0.625rem, 2.5vw, 1rem);
    display: flex;
    flex-direction: column;
}

/* === Banner Content === */
.cookie-banner-content {
    display: flex;
    flex-direction: column;
    gap: clamp(0.625rem, 2.5vh, 0.875rem);
    align-items: stretch;
    text-align: center;
    width: 100%;
}

.cookie-banner-back .cookie-banner-content {
    gap: clamp(0.375rem, 1.5vh, 0.625rem);
    height: 100%;
    justify-content: space-between;
    min-height: 0;
}

.cookie-banner-light h3 {
    color: var(--white);
    font-size: clamp(1rem, 4vw, 1.25rem);
    margin: 0;
    font-weight: 600;
    text-align: center;
}

.cookie-banner-light p {
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(0.75rem, 3vw, 0.875rem);
    margin: 0;
    line-height: 1.45;
    text-align: center;
    font-weight: 400;
}

.cookie-banner-light p strong {
    font-weight: 600;
    color: var(--white);
}

.cookie-banner-links {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    font-size: clamp(0.625rem, 2.5vw, 0.75rem);
    justify-content: center;
    opacity: 0.7;
    margin-top: clamp(0.25rem, 1vh, 0.375rem);
    order: 4;
}

.cookie-banner-light a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
    font-weight: 400;
    transition: all 0.2s ease;
}

.cookie-banner-light a:hover {
    color: var(--accent-color);
}

/* === Buttons === */
.cookie-banner-buttons {
    display: flex;
    flex-direction: column;
    gap: clamp(0.375rem, 1.5vh, 0.5rem);
    width: 100%;
    align-items: center;
}

.cookie-btn {
    padding: clamp(0.375rem, 1.5vh, 0.5rem) clamp(0.75rem, 3vw, 1rem);
    border-radius: clamp(0.25rem, 1vw, 0.375rem);
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.625rem, 2.5vw, 0.75rem);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 34px;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

/* Button ripple effect */
.cookie-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}

.cookie-btn:active::after {
    width: 60%;
    height: 60%;
}

.cookie-btn.accept:active::after {
    width: 80%;
    height: 80%;
}

/* Button variants */
.cookie-btn.accept {
    background-color: var(--accent-color);
    color: white;
    width: 100%;
    font-size: clamp(0.625rem, 2.5vw, 0.75rem);
    padding: clamp(0.4375rem, 1.75vh, 0.5625rem) clamp(0.875rem, 3.5vw, 1.25rem);
    font-weight: 500;
}

.cookie-btn.accept:hover {
    background-color: #FF2AA6;
    transform: translateY(-1px);
    box-shadow: 0 0.125rem 0.5rem rgba(235, 6, 140, 0.3);
}

.cookie-btn.reject,
.cookie-btn.customize {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex: 1;
    font-size: clamp(0.5625rem, 2.25vw, 0.6875rem);
    padding: clamp(0.3125rem, 1.25vh, 0.4375rem) clamp(0.625rem, 2.5vw, 0.875rem);
}

.cookie-btn.reject:hover,
.cookie-btn.customize:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    animation: hintFlip 0.5s ease;
}

.cookie-banner-buttons-secondary {
    display: flex;
    gap: clamp(0.375rem, 1.5vw, 0.5rem);
    justify-content: center;
    width: 100%;
}

/* === Back Panel Quick Preferences === */
.cookie-banner-back-header {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 1vw, 0.375rem);
    margin-bottom: clamp(0.25rem, 1vh, 0.5rem);
    padding: 0;
    flex-shrink: 0;
}

.cookie-back-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.6875rem, 2.75vw, 0.9375rem);
    cursor: pointer;
    padding: 0.0625rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(1.25rem, 5vw, 1.75rem);
    height: clamp(1.25rem, 5vw, 1.75rem);
    border-radius: 50%;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.cookie-back-button:hover {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(-2px);
}

.cookie-back-button:active {
    transform: translateX(-3px) scale(0.95);
}

.cookie-back-button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.cookie-banner-back-header h3 {
    margin: 0;
    font-size: clamp(0.5625rem, 2.25vw, 0.8125rem);
    color: var(--white);
    font-weight: 600;
    flex: 1;
    text-align: center;
    padding-right: clamp(1.375rem, 5.5vw, 1.875rem);
    line-height: 1.2;
}

/* === Quick Preferences Grid === */
.cookie-quick-preferences {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(0.375rem, 1.5vh, 0.5rem);
    margin: clamp(0.25rem, 1vh, 0.5rem) 0;
    flex: 0 1 auto;
    max-height: 60%;
}

.cookie-quick-category {
    background-color: rgba(255, 255, 255, 0.03);
    padding: clamp(0.3125rem, 1.25vh, 0.4375rem) clamp(0.4375rem, 1.75vw, 0.5625rem);
    border-radius: clamp(0.25rem, 1vw, 0.375rem);
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-quick-category:hover {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.cookie-quick-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(0.375rem, 1.5vw, 0.625rem);
}

.cookie-quick-label {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(0.5625rem, 2.25vw, 0.6875rem);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* === Toggle Switches === */
.cookie-quick-toggle,
.toggle-switch {
    position: relative;
    display: inline-block;
    width: clamp(1.625rem, 6.5vw, 2rem);
    height: clamp(0.8125rem, 3.25vh, 1rem);
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch {
    width: clamp(1.875rem, 7.5vw, 2.25rem);
    height: clamp(1rem, 4vh, 1.25rem);
}

.cookie-quick-toggle input,
.toggle-switch input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 1;
    cursor: pointer;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.cookie-quick-slider,
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    border-radius: clamp(0.8125rem, 3.25vh, 1rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.toggle-slider {
    background-color: #ccc;
    border-radius: clamp(1rem, 4vh, 1.25rem);
}

.cookie-quick-slider:before,
.toggle-slider:before {
    position: absolute;
    content: "";
    height: clamp(0.5625rem, 2.25vh, 0.6875rem);
    width: clamp(0.5625rem, 2.25vh, 0.6875rem);
    left: clamp(0.125rem, 0.5vh, 0.1875rem);
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toggle-slider:before {
    height: clamp(0.6875rem, 2.75vh, 0.875rem);
    width: clamp(0.6875rem, 2.75vh, 0.875rem);
    left: clamp(0.125rem, 0.5vh, 0.1875rem);
    bottom: clamp(0.125rem, 0.5vh, 0.1875rem);
    top: auto;
    transform: none;
}

/* Toggle active state */
.cookie-quick-toggle input:checked + .cookie-quick-slider,
input:checked + .toggle-slider {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.cookie-quick-toggle input:checked + .cookie-quick-slider:before {
    transform: translateX(clamp(0.6875rem, 2.75vw, 0.875rem)) translateY(-50%);
}

input:checked + .toggle-slider:before {
    transform: translateX(clamp(0.875rem, 3.5vw, 1rem));
}

/* Always-on state */
.cookie-quick-toggle.always-on .cookie-quick-slider {
    background-color: rgba(139, 233, 253, 0.6);
    cursor: not-allowed;
    border-color: rgba(139, 233, 253, 0.8);
}

.cookie-quick-toggle input:disabled + .cookie-quick-slider,
input:disabled + .toggle-slider {
    opacity: 0.8;
    cursor: not-allowed;
}

/* === Details Link === */
.cookie-details-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: clamp(0.5625rem, 2.25vw, 0.6875rem);
    text-decoration: underline;
    cursor: pointer;
    margin-top: auto;
    margin-bottom: clamp(0.0625rem, 0.25vh, 0.125rem);
    transition: color 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    width: 100%;
    padding: clamp(0.0625rem, 0.25vh, 0.125rem) 0;
    flex-shrink: 0;
    min-height: 0;
}

.cookie-details-link:hover {
    color: var(--accent-color);
}

/* === Minimized State === */
.cookie-banner-light.minimized {
    position: fixed;
    left: clamp(0.5rem, 2vw, 1rem);
    bottom: clamp(0.5rem, 2vh, 1rem);
    top: auto;
    right: auto;
    transform: none;
    width: clamp(2.5rem, 10vw, 3rem);
    height: clamp(2.5rem, 10vw, 3rem);
    padding: 0;
    border-radius: 50%;
    background-color: var(--primary-color) !important;
    border: 2px solid rgba(235, 6, 140, 0.4) !important;
    box-shadow: 0 0.3125rem 0.75rem rgba(0, 0, 0, 0.3) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: minimizeIn 0.3s ease-out;
    perspective: none;
    transition: all 0.3s ease;
}

.cookie-banner-light.minimized:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0.3125rem 0.75rem rgba(235, 6, 140, 0.4);
}

.cookie-banner-light.minimized .cookie-banner-flip-container,
.cookie-banner-light.minimized .cookie-banner-content {
    display: none;
}

/* === Cookie Icon === */
.cookie-icon {
    display: none;
    color: var(--accent-color);
    font-size: clamp(1rem, 4vw, 1.25rem);
}

.cookie-banner-light.minimized .cookie-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* === Dismissing Animation === */
.cookie-banner-light.dismissing {
    animation: quickDismiss 0.2s ease-out forwards;
}

/* === Visibility States === */
.cookie-banner-light:not(.flipped) .cookie-banner-back {
    visibility: hidden;
    pointer-events: none;
}

.cookie-banner-light.flipped .cookie-banner-front {
    visibility: hidden;
    pointer-events: none;
}

.cookie-banner-light.flipped .cookie-banner-back {
    pointer-events: all;
}

.cookie-banner-light.flipped .cookie-banner-flip-container {
    z-index: 10;
}

/* === Cookie Settings Modal === */
#cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: flex-end;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
    padding: clamp(0.5rem, 2vw, 1rem);
    overflow: hidden;
}

#cookie-settings-modal.visible {
    opacity: 1;
}

.modal-content {
    background-color: white;
    color: #333;
    border-radius: clamp(0.5rem, 2vw, 0.75rem);
    width: 100%;
    max-width: 60rem;
    max-height: calc(100vh - clamp(1rem, 4vw, 2rem));
    height: auto;
    min-height: 400px;
    overflow: hidden;
    box-shadow: 0 0.625rem 2rem rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.3s forwards;
    display: flex;
    flex-direction: column;
}

/* === Modal Header === */
.modal-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.625rem, 2.5vh, 1rem);
    border-bottom: 1px solid #e0e0e0;
    background-color: white;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.modal-logo-container {
    display: flex;
    align-items: center;
}

.modal-logo-text {
    height: clamp(1.875rem, 7.5vh, 2.5rem);
    width: auto;
    object-fit: contain;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: clamp(1.125rem, 4.5vw, 1.375rem);
    color: #666;
    cursor: pointer;
    padding: clamp(0.1875rem, 0.75vw, 0.375rem);
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    color: #333;
}

.modal-close-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* === Modal Tabs === */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background-color: white;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.modal-tab {
    padding: clamp(0.5rem, 2vh, 0.75rem) clamp(0.875rem, 3.5vw, 1.25rem);
    font-size: clamp(0.75rem, 3vw, 0.875rem);
    font-weight: 500;
    cursor: pointer;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.modal-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.modal-tab:hover:not(.active) {
    background-color: #f9f9f9;
}

/* === Tab Content === */
.cookie-tab-content {
    padding: clamp(0.75rem, 3vh, 1rem);
    display: none;
    flex: 1;
    overflow-y: hidden;
    overflow-x: hidden;
    min-height: 0;
    height: 100%;
    position: relative;
    transition: opacity 0.2s ease;
}

.cookie-tab-content.active {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.cookie-tab-content.active::-webkit-scrollbar {
    width: 6px;
}

.cookie-tab-content.active::-webkit-scrollbar-track {
    background: transparent;
}

.cookie-tab-content.active::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.cookie-tab-content.active::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.cookie-tab-content:not(.active) {
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

#cookie-preferences,
#privacy-policy {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* === Cookie Preferences Tab === */
.cookie-preferences-header {
    background-color: #f9f9f9;
    padding: clamp(0.625rem, 2.5vh, 0.875rem);
    border-radius: clamp(0.25rem, 1vw, 0.375rem);
    margin-bottom: clamp(0.5rem, 2vh, 0.75rem);
    flex-shrink: 0;
}

#cookie-preferences {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.cookie-preferences-header h2 {
    font-size: clamp(0.9375rem, 3.75vw, 1.25rem);
    color: #333;
    margin-bottom: clamp(0.375rem, 1.5vh, 0.5rem);
    font-weight: 600;
}

.cookie-preferences-header p {
    font-size: clamp(0.6875rem, 2.75vw, 0.8125rem);
    color: #666;
    line-height: 1.4;
    margin-bottom: clamp(0.25rem, 1vh, 0.375rem);
}

.cookie-preferences-note {
    font-size: clamp(0.625rem, 2.5vw, 0.75rem);
    color: #777;
}

.cookie-preferences-link {
    margin-bottom: clamp(0.5rem, 2vh, 0.625rem);
    font-size: clamp(0.625rem, 2.5vw, 0.75rem);
}

.cookie-preferences-link a {
    color: var(--accent-color);
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.cookie-preferences-link a:hover {
    opacity: 0.8;
}

.cookie-btn.full-width {
    width: 100%;
    margin-bottom: 0;
    padding: clamp(0.375rem, 1.5vh, 0.5rem) clamp(0.875rem, 3.5vw, 1.25rem);
    font-size: clamp(0.6875rem, 2.75vw, 0.8125rem);
}

/* === Cookie Categories === */
.cookie-preferences-categories {
    margin-top: clamp(0.625rem, 2.5vh, 0.875rem);
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: clamp(0.5rem, 2vh, 1rem);
}

.cookie-preferences-categories h3 {
    font-size: clamp(0.8125rem, 3.25vw, 1rem);
    color: #333;
    margin-bottom: clamp(0.5rem, 2vh, 0.75rem);
    font-weight: 600;
}

.cookie-category-item {
    border: 1px solid #e0e0e0;
    border-radius: clamp(0.25rem, 1vw, 0.375rem);
    margin-bottom: clamp(0.375rem, 1.5vh, 0.5rem);
    background-color: white;
    transition: box-shadow 0.2s ease;
}

.cookie-category-item:last-child {
    margin-bottom: 0;
}

.cookie-category-item:hover {
    box-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.1);
}

.cookie-category-header-new {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.5rem, 2vh, 0.75rem);
    cursor: pointer;
    position: relative;
}

.cookie-category-header-new::after {
    content: '';
    position: absolute;
    right: clamp(0.75rem, 3vh, 1rem);
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transition: transform 0.3s ease;
}

.cookie-category-item.expanded .cookie-category-header-new::after {
    transform: translateY(-25%) rotate(-135deg);
}

.cookie-category-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding-right: clamp(1.5rem, 6vw, 2.25rem);
}

.cookie-category-name {
    font-size: clamp(0.75rem, 3vw, 0.875rem);
    font-weight: 600;
    color: #333;
}

.cookie-category-status {
    font-size: clamp(0.625rem, 2.5vw, 0.75rem);
    color: var(--accent-color);
    font-weight: 500;
}

/* === Category Details === */
.cookie-category-details {
    display: none;
    padding: 0 clamp(0.5rem, 2vh, 0.75rem) clamp(0.5rem, 2vh, 0.75rem);
    border-top: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.cookie-category-item.expanded .cookie-category-details {
    display: block;
}

.cookie-category-description {
    font-size: clamp(0.625rem, 2.5vw, 0.75rem);
    color: #666;
    line-height: 1.4;
    margin-bottom: clamp(0.5rem, 2vh, 0.625rem);
}

.cookie-subcategory {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(0.25rem, 1vh, 0.375rem);
    padding: clamp(0.25rem, 1vh, 0.375rem);
    background-color: white;
    border-radius: clamp(0.1875rem, 0.75vw, 0.25rem);
}

.cookie-subcategory h4 {
    font-size: clamp(0.625rem, 2.5vw, 0.75rem);
    font-weight: 600;
    color: #333;
    margin: 0;
}

.cookie-subcategory-status {
    font-size: clamp(0.5625rem, 2.25vw, 0.6875rem);
    color: var(--accent-color);
}

.cookie-subcategory-description {
    font-size: clamp(0.5625rem, 2.25vw, 0.6875rem);
    color: #666;
    line-height: 1.35;
    margin-bottom: clamp(0.375rem, 1.5vh, 0.5rem);
}

.cookie-list-link {
    background: none;
    border: none;
    color: var(--accent-color);
    text-decoration: underline;
    cursor: pointer;
    font-size: clamp(0.5625rem, 2.25vw, 0.6875rem);
    padding: 0;
    margin-bottom: clamp(0.25rem, 1vh, 0.375rem);
    transition: opacity 0.2s ease;
}

.cookie-list-link:hover {
    opacity: 0.8;
}

/* === Modal Footer === */
.modal-footer-new {
    display: flex;
    gap: clamp(0.5rem, 2vh, 0.75rem);
    padding: clamp(0.625rem, 2.5vh, 0.875rem);
    border-top: 1px solid #e0e0e0;
    background-color: white;
    position: relative;
    justify-content: flex-end;
    flex-shrink: 0;
    margin-top: auto;
}

.cookie-btn.secondary {
    background-color: transparent;
    color: #666;
    border: 1px solid #e0e0e0;
    padding: clamp(0.375rem, 1.5vh, 0.5rem) clamp(0.75rem, 3vw, 1rem);
    font-size: clamp(0.625rem, 2.5vw, 0.75rem);
}

.cookie-btn.secondary:hover {
    background-color: #f9f9f9;
    border-color: #ccc;
}

/* === Privacy Policy Tab === */
.policy-content {
    max-width: 50rem;
    margin: 0 auto;
    padding: clamp(0.75rem, 3vh, 1rem);
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

#privacy-policy {
    padding: 0;
}

#privacy-policy .policy-content {
    padding: clamp(1.5rem, 6vh, 2rem);
    width: 100%;
    max-width: none;
}

/* Hide cookie preference elements in privacy policy tab */
#privacy-policy .cookie-preferences-header,
#privacy-policy .cookie-preferences-categories,
#privacy-policy .cookie-preferences-link,
#privacy-policy .cookie-btn.full-width,
#privacy-policy .modal-footer-new,
#privacy-policy .cookie-category-item,
#privacy-policy .cookie-category-header-new,
#privacy-policy .cookie-category-main,
#privacy-policy .cookie-category-details,
#privacy-policy .toggle-switch,
#privacy-policy [class*="cookie-preferences"],
#privacy-policy [class*="cookie-category"],
#privacy-policy [class*="toggle-switch"],
#privacy-policy [class*="modal-footer"] {
    display: none !important;
}

#privacy-policy > div:has(.cookie-preferences-categories) {
    display: none !important;
}

#privacy-policy h3:nth-of-type(n+7),
#privacy-policy h3:last-of-type {
    display: none !important;
}

#privacy-policy .policy-section:nth-of-type(n+7) {
    display: none !important;
}

#privacy-policy .policy-update ~ * {
    display: none !important;
}

.policy-content h2 {
    font-size: clamp(1.25rem, 5vw, 1.625rem);
    color: #333;
    margin-bottom: clamp(0.75rem, 3vh, 1rem);
    font-weight: 600;
}

.policy-intro {
    font-size: clamp(0.8125rem, 3.25vw, 0.9375rem);
    color: #666;
    line-height: 1.5;
    margin-bottom: clamp(1rem, 4vh, 1.5rem);
}

.policy-section {
    margin-bottom: clamp(1rem, 4vh, 1.5rem);
}

.policy-section h3 {
    font-size: clamp(0.9375rem, 3.75vw, 1.125rem);
    color: #333;
    margin-bottom: clamp(0.5rem, 2vh, 0.75rem);
    font-weight: 600;
}

.policy-section h4 {
    font-size: clamp(0.8125rem, 3.25vw, 0.9375rem);
    color: #444;
    margin-top: clamp(0.75rem, 3vh, 1rem);
    margin-bottom: clamp(0.375rem, 1.5vh, 0.5rem);
    font-weight: 600;
}

.policy-section p {
    font-size: clamp(0.6875rem, 2.75vw, 0.8125rem);
    color: #666;
    line-height: 1.5;
    margin-bottom: clamp(0.5rem, 2vh, 0.75rem);
}

.policy-section ul {
    padding-left: clamp(1rem, 4vw, 1.25rem);
    margin-bottom: clamp(0.5rem, 2vh, 0.75rem);
}

.policy-section li {
    font-size: clamp(0.6875rem, 2.75vw, 0.8125rem);
    color: #666;
    line-height: 1.5;
    margin-bottom: clamp(0.1875rem, 0.75vh, 0.375rem);
}

.policy-update {
    font-size: clamp(0.625rem, 2.5vw, 0.75rem);
    color: #888;
    font-style: italic;
    margin-top: clamp(1.5rem, 6vh, 2rem);
    padding-top: clamp(0.75rem, 3vh, 1rem);
    border-top: 1px solid #e0e0e0;
}

#cookie-policy-section {
    scroll-margin-top: 1rem;
}

/* === Toggle Switch Accessibility === */
.cookie-category-header-new .toggle-switch {
    z-index: 10;
}

.cookie-category-header-new .toggle-switch:hover {
    transform: scale(1.05);
}

.cookie-quick-toggle,
.toggle-switch {
    pointer-events: auto !important;
}

.cookie-quick-toggle input,
.toggle-switch input {
    pointer-events: auto !important;
}

/* === Touch Device Optimizations === */
@media (hover: none) and (pointer: coarse) {
    .cookie-quick-toggle,
    .toggle-switch {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .cookie-quick-toggle input,
    .toggle-switch input {
        width: 100%;
        height: 100%;
        -webkit-tap-highlight-color: transparent;
    }
    
    .cookie-overlay:hover {
        background-color: rgba(0, 0, 0, 0.5);
    }
    
    /* Touch indicator */
    .cookie-overlay::before {
        content: '✕';
        position: absolute;
        top: 1rem;
        right: 1rem;
        color: rgba(255, 255, 255, 0.5);
        font-size: 1.5rem;
        font-weight: 300;
    }
}

/* === Responsive Design === */

/* Mobile */
@media (max-width: 768px) {
    #cookie-settings-modal {
        align-items: flex-end;
        padding-bottom: clamp(1rem, 5vh, 2rem);
        padding-top: 0;
    }
    
    .modal-content {
        height: auto;
        min-height: 350px;
        max-height: 65vh;
    }
    
    @keyframes modalSlideIn {
        from {
            transform: translateY(2rem);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

@media (max-width: 414px) {
    #cookie-settings-modal {
        align-items: flex-end;
        padding-bottom: clamp(0.75rem, 4vh, 1.5rem);
        padding-top: 0;
    }
    
    .modal-content {
        height: auto;
        min-height: 320px;
        max-height: 60vh;
    }
    
    .cookie-banner-light {
        width: min(92%, 24rem);
        bottom: 0.5rem;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .cookie-banner-front,
    .cookie-banner-back {
        padding: 0.625rem 0.75rem;
    }
    
    .cookie-banner-back {
        padding: 0.3125rem 0.375rem;
    }
    
    .cookie-banner-back .cookie-banner-content {
        gap: 0.1875rem;
    }
    
    .cookie-banner-content {
        gap: 0.3125rem;
    }
    
    .cookie-banner-light h3 {
        font-size: 0.875rem;
    }
    
    .cookie-banner-back-header {
        gap: 0.1875rem;
        margin-bottom: 0.25rem;
    }
    
    .cookie-banner-back-header h3 {
        font-size: 0.4375rem;
        padding-right: 0.875rem;
    }
    
    .cookie-banner-light p {
        font-size: 0.625rem;
        line-height: 1.35;
    }
    
    .cookie-banner-links {
        font-size: 0.5rem;
        gap: 0.25rem;
        margin-top: 0.125rem;
    }
    
    .cookie-banner-buttons {
        gap: 0.25rem;
    }
    
    .cookie-banner-buttons-secondary {
        gap: 0.1875rem;
    }
    
    .cookie-btn {
        min-height: 30px;
    }
    
    .cookie-btn.reject,
    .cookie-btn.customize {
        padding: 0.25rem 0.5rem;
        font-size: 0.5rem;
        min-height: 28px;
    }
    
    .cookie-btn.accept {
        padding: 0.3125rem 0.625rem;
        font-size: 0.5625rem;
        min-height: 32px;
    }
    
    .cookie-banner-light.minimized {
        width: 2.25rem;
        height: 2.25rem;
        position: fixed;
        left: 0.375rem !important;
        bottom: 0.375rem;
        transform: none !important;
        display: flex;
        perspective: none;
    }
    
    .cookie-icon {
        font-size: 0.875rem;
    }
    
    .cookie-back-button {
        width: 0.875rem;
        height: 0.875rem;
        font-size: 0.4375rem;
        padding: 0;
    }
    
    .cookie-banner-back-header h3 {
        font-size: 0.4375rem;
        padding-right: 0.875rem;
    }
    
    .cookie-quick-preferences {
        gap: 0.1875rem;
        margin: 0.125rem 0;
        grid-template-columns: 1fr;
    }
    
    .cookie-quick-category {
        padding: 0.25rem 0.3125rem;
    }
    
    .cookie-quick-toggle {
        width: 1.375rem;
        height: 0.625rem;
    }
    
    .cookie-quick-slider:before {
        height: 0.4375rem;
        width: 0.4375rem;
        left: 0.0625rem;
    }
    
    .cookie-quick-toggle input:checked + .cookie-quick-slider:before {
        transform: translateX(0.625rem) translateY(-50%);
    }
    
    .cookie-quick-label {
        font-size: 0.4375rem;
    }
    
    .cookie-quick-header {
        gap: 0.25rem;
    }
    
    .cookie-banner-back .cookie-btn.accept {
        padding: 0.25rem 0.5rem;
        font-size: 0.5rem;
        min-height: 28px;
    }
    
    .cookie-banner-back .cookie-banner-buttons {
        margin-top: 0.125rem;
        margin-bottom: 0;
    }
    
    .cookie-details-link {
        font-size: 0.5rem;
        margin-top: auto;
        margin-bottom: 0;
        padding: 0 0;
    }
    
    .modal-header-top {
        padding: 0.375rem 0.5rem;
    }
    
    .modal-logo-text {
        height: 1.25rem;
    }
    
    .modal-close-btn {
        font-size: 0.75rem;
        padding: 0.0625rem;
    }
    
    .modal-tabs {
        flex-wrap: nowrap;
    }
    
    .modal-tab {
        font-size: 0.5625rem;
        padding: 0.3125rem 0.5rem;
        white-space: nowrap;
    }
    
    .cookie-tab-content {
        padding: 0.375rem;
    }
    
    .cookie-preferences-header {
        padding: 0.375rem;
    }
    
    .cookie-preferences-header h2 {
        font-size: 0.6875rem;
    }
    
    .cookie-preferences-header p {
        font-size: 0.5rem;
    }
    
    .cookie-preferences-categories h3 {
        font-size: 0.625rem;
        margin-bottom: 0.25rem;
    }
    
    .cookie-category-item {
        margin-bottom: 0.1875rem;
    }
    
    .cookie-category-header-new {
        padding: 0.3125rem;
    }
    
    .cookie-category-name {
        font-size: 0.5625rem;
    }
    
    .cookie-category-status {
        font-size: 0.4375rem;
    }
    
    .toggle-switch {
        width: 1.375rem;
        height: 0.625rem;
    }
    
    .toggle-slider:before {
        height: 0.4375rem;
        width: 0.4375rem;
    }
    
    input:checked + .toggle-slider:before {
        transform: translateX(0.5625rem);
    }
    
    .modal-footer-new {
        padding: 0.375rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .modal-footer-new .cookie-btn {
        width: 100%;
        padding: 0.25rem 0.5rem;
        font-size: 0.5rem;
    }
    
    .cookie-btn.full-width {
        padding: 0.25rem 0.5rem;
        font-size: 0.5rem;
    }
}

/* Small mobile */
@media (max-width: 375px) {
    #cookie-settings-modal {
        align-items: flex-end;
        padding-bottom: clamp(0.5rem, 3vh, 1rem);
        padding-top: 0;
    }
    
    .modal-content {
        height: auto;
        min-height: 300px;
        max-height: 55vh;
    }
    
    .cookie-banner-light {
        width: min(94%, 22rem);
        font-size: 0.5rem;
        bottom: 0.375rem;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .cookie-banner-front,
    .cookie-banner-back {
        padding: 0.5rem 0.625rem;
    }
    
    .cookie-banner-back {
        padding: 0.25rem 0.3125rem;
    }
    
    .cookie-banner-back .cookie-banner-content {
        gap: 0.125rem;
    }
    
    .cookie-banner-light h3 {
        font-size: 0.75rem;
    }
    
    .cookie-banner-back-header h3 {
        font-size: 0.375rem;
        padding-right: 0.75rem;
    }
    
    .cookie-banner-light p {
        font-size: 0.5625rem;
        line-height: 1.3;
    }
    
    .cookie-banner-links {
        font-size: 0.4375rem;
    }
    
    .cookie-btn.reject,
    .cookie-btn.customize {
        font-size: 0.4375rem;
        padding: 0.1875rem 0.375rem;
        min-height: 26px;
    }
    
    .cookie-btn.accept {
        font-size: 0.5rem;
        padding: 0.25rem 0.5rem;
        min-height: 28px;
    }
    
    .cookie-banner-light.minimized {
        width: 2rem;
        height: 2rem;
        left: 0.25rem !important;
        bottom: 0.25rem;
    }
    
    .cookie-icon {
        font-size: 0.75rem;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .cookie-banner-light {
        bottom: 1.5rem;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: min(70%, 28rem);
    }
    
    .cookie-banner-front,
    .cookie-banner-back {
        padding: 1rem 1.5rem;
    }
    
    .cookie-quick-preferences {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .cookie-banner-light h3 {
        font-size: 1.1875rem;
    }
    
    .cookie-banner-light p {
        font-size: 0.875rem;
    }
    
    .cookie-banner-buttons {
        gap: 0.5rem;
    }
    
    .cookie-banner-buttons-secondary {
        gap: 0.5rem;
    }
    
    .cookie-btn {
        min-height: 36px;
    }
    
    .cookie-btn.customize,
    .cookie-btn.reject {
        flex: 0 1 auto;
        min-width: 6rem;
        padding: 0.375rem 0.875rem;
        font-size: 0.625rem;
    }
    
    .cookie-btn.accept {
        width: auto;
        min-width: 9rem;
        padding: 0.5rem 1.25rem;
        font-size: 0.75rem;
    }
    
    .cookie-banner-links {
        font-size: 0.6875rem;
    }
    
    #cookie-settings-modal {
        align-items: flex-end;
        padding-bottom: clamp(1.5rem, 6vh, 3rem);
        padding-top: 0;
    }
    
    .modal-content {
        height: auto;
        min-height: 380px;
        max-height: 70vh;
    }
    
    .modal-header-top {
        padding: 0.875rem 1.25rem;
    }
    
    .modal-tab {
        padding: 0.75rem 1.25rem;
        font-size: 0.8125rem;
    }
    
    .cookie-tab-content {
        padding: 1.25rem;
    }
    
    .modal-footer-new {
        flex-direction: row;
        padding: 0.875rem 1.25rem;
    }
    
    .modal-footer-new .cookie-btn {
        width: auto;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    #cookie-settings-modal {
        align-items: center;
    }
    
    .modal-content {
        height: auto;
        max-height: calc(90vh - 2rem);
    }
    
    .cookie-banner-light {
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: min(45%, 30rem);
        bottom: 2rem;
    }
    
    .cookie-banner-front,
    .cookie-banner-back {
        padding: 1.25rem 1.75rem;
    }
    
    .cookie-banner-light h3 {
        font-size: 1.25rem;
    }
    
    .cookie-banner-light p {
        font-size: 0.9375rem;
        line-height: 1.5;
    }
    
    .cookie-btn {
        min-height: 38px;
    }
    
    .cookie-btn.customize,
    .cookie-btn.reject {
        min-width: 6.5rem;
        padding: 0.4375rem 1rem;
        font-size: 0.6875rem;
    }
    
    .cookie-btn.accept {
        min-width: 10rem;
        padding: 0.5625rem 1.5rem;
        font-size: 0.8125rem;
        font-weight: 500;
    }
    
    .cookie-banner-links {
        font-size: 0.75rem;
    }
    
    .modal-header-top {
        padding: 1.25rem 1.75rem;
    }
    
    .modal-logo-text {
        height: 3rem;
    }
    
    .modal-tab {
        padding: 1rem 1.75rem;
        font-size: 0.9375rem;
    }
    
    .cookie-tab-content {
        padding: 2rem;
    }
    
    .cookie-preferences-header {
        padding: 1.25rem;
    }
    
    .cookie-preferences-header h2 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .cookie-preferences-header p {
        font-size: 0.9375rem;
        margin-bottom: 0.5rem;
    }
    
    .cookie-preferences-categories h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .cookie-category-header-new {
        padding: 1rem;
    }
    
    .cookie-category-name {
        font-size: 1rem;
    }
    
    .modal-footer-new {
        padding: 1.25rem 1.75rem;
        gap: 1rem;
    }
    
    .cookie-btn.full-width,
    .cookie-btn.secondary,
    .modal-footer-new .cookie-btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* Height-based adjustments */
@media (max-height: 600px) {
    #cookie-settings-modal {
        align-items: flex-end;
        padding-bottom: clamp(0.5rem, 3vh, 1rem);
        padding-top: 0;
    }
    
    .modal-content {
        height: auto;
        min-height: 250px;
        max-height: 85vh;
    }
    
    .modal-header-top {
        padding: 0.375rem 0.75rem;
    }
    
    .modal-logo-text {
        height: 1.25rem;
    }
    
    .modal-tab {
        padding: 0.375rem 0.75rem;
        font-size: 0.625rem;
    }
    
    .cookie-tab-content {
        padding: 0.5rem;
    }
    
    .cookie-preferences-header {
        padding: 0.375rem;
        margin-bottom: 0.375rem;
    }
    
    .cookie-preferences-header h2 {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .cookie-preferences-header p {
        font-size: 0.5625rem;
        margin-bottom: 0.1875rem;
    }
    
    .cookie-preferences-categories h3 {
        font-size: 0.625rem;
        margin-bottom: 0.25rem;
    }
    
    .cookie-category-item {
        margin-bottom: 0.1875rem;
    }
    
    .cookie-category-header-new {
        padding: 0.3125rem;
    }
    
    .modal-footer-new {
        padding: 0.375rem 0.75rem;
    }
    
    .cookie-banner-back {
        padding: 0.3125rem 0.375rem;
    }
    
    .cookie-banner-back-header {
        margin-bottom: 0.25rem;
    }
    
    .cookie-quick-preferences {
        gap: 0.1875rem;
        margin: 0.25rem 0;
        grid-template-columns: 1fr;
    }
    
    .cookie-quick-category {
        padding: 0.25rem 0.3125rem;
    }
    
    .cookie-quick-toggle {
        width: 1.375rem;
        height: 0.625rem;
    }
    
    .cookie-quick-slider:before {
        height: 0.4375rem;
        width: 0.4375rem;
    }
    
    .cookie-quick-label {
        font-size: 0.4375rem;
    }
    
    .cookie-banner-back .cookie-btn.accept {
        padding: 0.25rem 0.5625rem;
        font-size: 0.5rem;
        min-height: 28px;
    }
}

/* === Focus Styles === */
.cookie-btn:focus-visible,
.modal-tab:focus-visible,
.toggle-switch input:focus-visible + .toggle-slider,
.cookie-quick-toggle input:focus-visible + .cookie-quick-slider,
.cookie-back-button:focus-visible,
.cookie-details-link:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner-flip-container {
        transition: none;
    }
    
    .cookie-banner-light.flipped .cookie-banner-flip-container {
        transform: none;
    }
    
    .cookie-banner-light.flipped .cookie-banner-front {
        opacity: 0;
    }
    
    .cookie-banner-light.flipped .cookie-banner-back {
        opacity: 1;
        transform: rotateY(0deg);
    }
    
    .cookie-banner-back {
        transform: rotateY(0deg);
        opacity: 0;
        transition: opacity 0.3s ease;
    }
}

/* === Print Styles === */
@media print {
    .cookie-banner-light,
    #cookie-settings-modal {
        display: none !important;
    }
}

/* === Safe Area Support === */
@supports (padding: max(0px)) {
    .cookie-banner-light {
        bottom: max(clamp(0.75rem, 3vh, 1.5rem), env(safe-area-inset-bottom));
    }
    
    .cookie-banner-light.minimized {
        left: max(0.375rem, env(safe-area-inset-left)) !important;
        bottom: max(0.375rem, env(safe-area-inset-bottom));
        transform: none !important;
    }
    
    #cookie-settings-modal {
        padding: max(clamp(0.5rem, 2vw, 1rem), env(safe-area-inset-top)) 
                max(clamp(0.5rem, 2vw, 1rem), env(safe-area-inset-right))
                max(clamp(0.5rem, 2vw, 1rem), env(safe-area-inset-bottom))
                max(clamp(0.5rem, 2vw, 1rem), env(safe-area-inset-left));
    }
}