/* ============================================
   Cookie Consent Banner — DSGVO/GDPR
   ============================================ */

/* ── Banner container ── */
.cb {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
}
.cb--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}
.cb--hiding {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Overlay — removed, no background dimming */
.cb-overlay {
    display: none;
}

/* ── Card ── */
.cb-card {
    max-width: 520px;
    margin: 0 24px 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .04);
    overflow: hidden;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

/* ── Main content ── */
.cb-main {
    display: flex;
    gap: 16px;
    padding: 24px 24px 16px;
}

.cb-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 12px;
    color: #0066FF;
}

.cb-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
}

.cb-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0 0 8px;
}

.cb-link {
    font-size: 13px;
    color: #0066FF;
    text-decoration: none;
    font-weight: 500;
}
.cb-link:hover {
    text-decoration: underline;
}

/* ── Action buttons ── */
.cb-actions {
    display: flex;
    gap: 8px;
    padding: 0 24px 20px;
}

.cb-btn {
    flex: 1;
    padding: 11px 16px;
    border: none;
    border-radius: 10px;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}

.cb-btn--accept {
    background: #0066FF;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 102, 255, .25);
}
.cb-btn--accept:hover {
    background: #0052CC;
}

.cb-btn--necessary {
    background: #f3f4f6;
    color: #374151;
}
.cb-btn--necessary:hover {
    background: #e5e7eb;
}

.cb-btn--settings {
    background: transparent;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}
.cb-btn--settings:hover {
    background: #f9fafb;
    color: #374151;
}

/* ── Detail panel (expandable) ── */
.cb-details {
    display: none;
    padding: 0 24px 20px;
    border-top: 1px solid #f3f4f6;
}
.cb-details.open {
    display: block;
}

.cb-detail-row {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}
.cb-detail-row:last-of-type {
    border-bottom: none;
}

.cb-detail-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: default;
}

.cb-always {
    font-size: 11px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, .1);
    padding: 3px 10px;
    border-radius: 20px;
}

/* Toggle switch */
.cb-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}
.cb-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.cb-toggle-s {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 12px;
    transition: background .2s;
}
.cb-toggle-s::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.cb-toggle input:checked + .cb-toggle-s {
    background: #0066FF;
}
.cb-toggle input:checked + .cb-toggle-s::before {
    transform: translateX(20px);
}

.cb-detail-actions {
    padding-top: 12px;
}
.cb-detail-actions .cb-btn {
    width: 100%;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .cb-card {
        margin: 0 12px 12px;
        border-radius: 14px;
    }
    .cb-main {
        padding: 20px 20px 12px;
        gap: 12px;
    }
    .cb-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }
    .cb-icon svg {
        width: 22px;
        height: 22px;
    }
    .cb-title {
        font-size: 15px;
    }
    .cb-desc {
        font-size: 12px;
    }
    .cb-actions {
        flex-wrap: wrap;
        padding: 0 20px 16px;
        gap: 6px;
    }
    .cb-btn {
        padding: 12px 14px;
        font-size: 13px;
    }
    .cb-btn--accept {
        flex: 1 1 100%;
        order: -1;
    }
    .cb-btn--necessary,
    .cb-btn--settings {
        flex: 1 1 45%;
    }
    .cb-details {
        padding: 0 20px 16px;
    }
}

@media (max-width: 480px) {
    .cb-card {
        margin: 0 8px 8px;
    }
    .cb-main {
        flex-direction: column;
        gap: 8px;
        padding: 16px 16px 10px;
    }
    .cb-icon {
        width: 36px;
        height: 36px;
    }
    .cb-actions {
        padding: 0 16px 14px;
    }
}

/* ============================================
   Cookie Settings Page Styles
   ============================================ */
.cookie-settings-page {
    margin: 24px 0;
}

.cookie-category-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
}

.cookie-category-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 6px;
}

.cookie-category-info p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.cookie-toggle-wrap {
    flex-shrink: 0;
    padding-top: 2px;
}

.cookie-always-on {
    font-size: 12px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, .1);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Toggle (same style as banner) */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}
.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 13px;
    transition: background .2s;
}
.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #0066FF;
}
.cookie-toggle input:checked + .cookie-toggle-slider::before {
    transform: translateX(22px);
}

/* Cookie detail tables */
.cookie-details {
    padding: 0 20px 20px;
    border-top: 1px solid #f3f4f6;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.cookie-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f3f4f6;
}

.cookie-table td {
    padding: 10px 12px;
    color: #374151;
    border-bottom: 1px solid #f9fafb;
}

.cookie-table a {
    color: #0066FF;
    text-decoration: none;
}
.cookie-table a:hover {
    text-decoration: underline;
}

.cookie-page-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.cookie-page-actions .btn {
    padding: 12px 24px;
}

/* Mobile cookie settings page */
@media (max-width: 768px) {
    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    .cookie-details {
        padding: 0 16px 16px;
        overflow-x: auto;
    }
    .cookie-table {
        font-size: 12px;
        min-width: 400px;
    }
    .cookie-page-actions {
        flex-direction: column;
    }
    .cookie-page-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
