.cookie-reopen-btn { position: fixed; bottom: 24px; background-color: var(--rk-cb-bg); color: var(--rk-cb-primary); border: 1px solid var(--rk-cb-toggle); border-radius: 50%; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); cursor: pointer; z-index: 99980; opacity: 0; visibility: hidden; transform: scale(0.8); transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.cookie-reopen-btn.reopen-pos-bottom-left { left: 24px; right: auto; }
.cookie-reopen-btn.reopen-pos-bottom-right { right: 24px; left: auto; }
.cookie-reopen-btn.show { opacity: 1; visibility: visible; transform: scale(1); }
.cookie-reopen-btn:hover { transform: scale(1.1); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

.cookie-banner-wrapper { position: fixed; width: 90%; max-width: 800px; background-color: var(--rk-cb-bg); border: 1px solid var(--rk-cb-toggle); border-radius: 12px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); z-index: 99990; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; padding: 24px; color: var(--rk-cb-text); opacity: 0; visibility: hidden; transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); }

.cookie-banner-wrapper.banner-pos-bottom-center { bottom: 24px; left: 50%; transform: translate(-50%, 100px); }
.cookie-banner-wrapper.banner-pos-bottom-center.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

.cookie-banner-wrapper.banner-pos-bottom-left { bottom: 24px; left: 24px; transform: translate(0, 100px); }
.cookie-banner-wrapper.banner-pos-bottom-left.show { transform: translate(0, 0); opacity: 1; visibility: visible; }

.cookie-banner-wrapper.banner-pos-bottom-right { bottom: 24px; right: 24px; transform: translate(0, 100px); }
.cookie-banner-wrapper.banner-pos-bottom-right.show { transform: translate(0, 0); opacity: 1; visibility: visible; }

.cookie-banner-wrapper.banner-pos-top-center { top: 24px; left: 50%; transform: translate(-50%, -100px); }
.cookie-banner-wrapper.banner-pos-top-center.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

.cookie-banner-content { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 768px) { .cookie-banner-content { flex-direction: row; align-items: center; justify-content: space-between; } }
.cookie-text-area h3 { margin: 0 0 8px 0; font-size: 1.125rem; font-weight: 600; color: var(--rk-cb-heading); }
.cookie-text-area h3 .fa-solid { color: var(--rk-cb-primary); }
.cookie-text-area p { margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--rk-cb-text); }
.cookie-action-area { display: flex; flex-direction: column; gap: 12px; min-width: 320px; }
@media (min-width: 480px) { .cookie-action-area { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; } }

.btn-cookie { padding: 10px 16px; border-radius: 8px; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease-in-out; text-align: center; flex: 1; border: none; white-space: nowrap; }
.btn-cookie-primary { background-color: var(--rk-cb-primary); color: #ffffff; }
.btn-cookie-primary:hover { background-color: var(--rk-cb-primary-hover); }
.btn-cookie-secondary { background-color: var(--rk-cb-secondary); color: var(--rk-cb-secondary-text); border: 1px solid var(--rk-cb-toggle); }
#btn-cookie-essential.btn-cookie-secondary { background-color: var(--rk-cb-secondary); color: var(--rk-cb-secondary-text); border-color: var(--rk-cb-toggle); }
.btn-cookie-secondary:hover { opacity: 0.8; }
.btn-cookie .fa-solid,
.cookie-modal-header .fa-solid,
.cookie-reopen-btn .fa-solid { line-height: 1; }

.cookie-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); z-index: 99999; display: flex; align-items: center; justify-content: center; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.cookie-modal-overlay.show { opacity: 1; visibility: visible; }
.cookie-modal-content { background-color: var(--rk-cb-bg); border-radius: 12px; width: 92%; max-width: 560px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); display: flex; flex-direction: column; overflow: hidden; transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.cookie-modal-overlay.has-topic-focus .cookie-modal-content { max-width: 860px; }
.cookie-modal-overlay.show .cookie-modal-content { transform: scale(1); }

.cookie-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--rk-cb-toggle); }
.cookie-modal-header h4 { margin: 0; font-size: 1.125rem; font-weight: 600; color: var(--rk-cb-heading); }
.btn-close-modal { background: transparent; border: none; font-size: 1.25rem; color: var(--rk-cb-text); cursor: pointer; padding: 4px; transition: color 0.2s; }
.btn-close-modal:hover { color: var(--rk-cb-heading); }

.cookie-modal-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; max-height: min(72vh, 680px); overflow-y: auto; }
.cookie-group { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px dashed var(--rk-cb-toggle); padding-bottom: 15px; }
.cookie-group:last-child { border-bottom: none; padding-bottom: 0; }
.cookie-group-info h5 { margin: 0 0 4px 0; font-size: 0.95rem; font-weight: 600; color: var(--rk-cb-heading); }
.cookie-group-info p { margin: 0; font-size: 0.8rem; line-height: 1.4; color: var(--rk-cb-text); }
.cookie-essential-group { align-items: flex-start; border: 1px solid var(--rk-cb-toggle); border-left: 5px solid var(--rk-cb-toggle); border-radius: 10px; padding: 14px; background: var(--rk-cb-secondary); }
.cookie-essential-group .toggle-switch input:checked + .toggle-slider.disabled { background-color: var(--rk-cb-toggle); }
.cookie-essential-list { margin-top: 12px; }
.cookie-essential-list:empty { display: none; }
.cookie-essential-items { display: flex; flex-direction: column; gap: 10px; }
.cookie-essential-items .cookie-group { padding: 10px; border: 1px dashed var(--rk-cb-toggle); border-radius: 8px; background: var(--rk-cb-bg); }
.cookie-essential-items .cookie-group:last-child { padding-bottom: 10px; border-bottom: 1px dashed var(--rk-cb-toggle); }
.cookie-modal-footer { padding: 16px 24px; border-top: 1px solid var(--rk-cb-toggle); background-color: var(--rk-cb-secondary); display: flex; justify-content: flex-end; }
#dynamic-cookie-groups { display: flex; flex-direction: column; gap: 18px; }
.cookie-topic-layout { display: grid; gap: 18px; }
.cookie-modal-overlay.has-topic-focus .cookie-topic-layout { grid-template-columns: minmax(170px, 220px) minmax(0, 1fr); align-items: start; }
.cookie-topic-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; padding: 10px; border: 1px solid var(--rk-cb-toggle); border-radius: 10px; background: var(--rk-cb-secondary); }
.cookie-modal-overlay.has-topic-focus .cookie-topic-nav { position: sticky; top: 0; grid-template-columns: 1fr; }
.cookie-topic-pill { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--rk-cb-toggle); background: var(--rk-cb-bg); color: var(--rk-cb-secondary-text); font: inherit; font-size: 0.8rem; font-weight: 700; text-align: left; text-decoration: none; cursor: pointer; transition: border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, transform 0.18s ease; }
.cookie-topic-pill:hover { border-color: var(--rk-cb-primary); color: var(--rk-cb-primary); transform: translateY(-1px); }
.cookie-topic-pill.is-active { border-color: var(--rk-cb-primary); color: var(--rk-cb-primary); box-shadow: inset 4px 0 0 var(--rk-cb-primary), 0 8px 18px rgba(0, 0, 0, 0.08); }
.cookie-topic-pill.is-muted { opacity: 0.42; }
.cookie-topic-pill-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--rk-cb-secondary); color: var(--rk-cb-secondary-text); font-size: 0.72rem; }
.cookie-topic-sections { display: flex; flex-direction: column; gap: 14px; }
.cookie-topic-section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; padding: 14px; border: 1px solid var(--rk-cb-toggle); border-left: 5px solid var(--rk-cb-primary); border-radius: 10px; background: var(--rk-cb-bg); transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease; }
.cookie-topic-section.is-active { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.10); transform: translateY(-1px); }
.cookie-topic-section.is-muted { opacity: 0.32; filter: grayscale(0.55); }
.cookie-topic-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rk-cb-toggle); }
.cookie-topic-heading { margin: 0; font-size: 0.9rem; font-weight: 800; color: var(--rk-cb-heading); }
.cookie-topic-count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 24px; border-radius: 999px; background: var(--rk-cb-primary); color: #ffffff; font-size: 0.72rem; font-weight: 800; }
.cookie-topic-cookies { display: flex; flex-direction: column; gap: 14px; }
.cookie-topic-cookies .cookie-group { padding: 0 0 14px 0; }

@media (max-width: 760px) {
    .cookie-modal-content,
    .cookie-modal-overlay.has-topic-focus .cookie-modal-content { width: 96%; max-width: 96%; }
    .cookie-modal-overlay.has-topic-focus .cookie-topic-layout { grid-template-columns: 1fr; }
    .cookie-modal-overlay.has-topic-focus .cookie-topic-nav { position: static; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
}

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0;}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--rk-cb-toggle); transition: .3s; border-radius: 24px; }
.toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: var(--rk-cb-bg); transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.toggle-switch input:checked + .toggle-slider { background-color: var(--rk-cb-primary); }
.toggle-switch input:focus + .toggle-slider { box-shadow: 0 0 1px var(--rk-cb-primary); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }
.toggle-slider.disabled { opacity: 0.6; cursor: not-allowed; }
.toggle-switch input:checked + .toggle-slider.disabled { background-color: var(--rk-cb-primary-hover); }
.cookie-domain-info { display: block; font-size: 0.7rem; color: var(--rk-cb-text); opacity: 0.7; margin-top: 4px; word-break: break-all; }
.cookie-description-missing { color: #b91c1c; font-weight: 600; }
.cookie-debug-panel { border: 1px solid var(--rk-cb-toggle); border-radius: 8px; padding: 12px; background: var(--rk-cb-secondary); color: var(--rk-cb-secondary-text); }
.cookie-debug-panel h5 { margin: 0 0 6px 0; font-size: 0.9rem; color: var(--rk-cb-heading); }
.cookie-debug-panel p { margin: 0 0 8px 0; font-size: 0.75rem; line-height: 1.4; }
.cookie-debug-panel ul { margin: 0; padding-left: 18px; max-height: 150px; overflow-y: auto; }
.cookie-debug-panel li { margin-bottom: 6px; font-size: 0.72rem; line-height: 1.35; word-break: break-word; }
.cookie-debug-error { color: #b91c1c; }
.cookie-debug-warning { color: #92400e; }
.cookie-debug-info { color: var(--rk-cb-secondary-text); }
.cookie-debug-empty { border: 1px dashed var(--rk-cb-toggle); border-radius: 8px; padding: 12px; font-size: 0.8rem; color: var(--rk-cb-text); }
