/* Cookie Consent Banner — KalOps.ai */

/* ── Banner ── */
.kcc-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1e293b;
    color: #cbd5e1;
    padding: 20px 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.kcc-banner.kcc-hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}
.kcc-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.kcc-text {
    flex: 1 1 400px;
}
.kcc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Buttons ── */
.kcc-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1;
}
.kcc-btn:active {
    transform: scale(0.97);
}
.kcc-btn-accept {
    background: #d4a843;
    color: #1e293b;
}
.kcc-btn-accept:hover {
    background: #c49935;
}
.kcc-btn-necessary {
    background: #334155;
    color: #e2e8f0;
}
.kcc-btn-necessary:hover {
    background: #3d4f66;
}
.kcc-btn-settings {
    background: transparent;
    color: #d4a843;
    text-decoration: underline;
    padding: 10px 12px;
    font-weight: 500;
}
.kcc-btn-settings:hover {
    color: #e8be5e;
}

/* ── Settings Modal ── */
.kcc-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.kcc-overlay.kcc-visible {
    opacity: 1;
    visibility: visible;
}
.kcc-modal {
    background: #1e293b;
    color: #cbd5e1;
    border-radius: 12px;
    padding: 28px;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transform: translateY(20px);
    transition: transform 0.3s;
}
.kcc-overlay.kcc-visible .kcc-modal {
    transform: translateY(0);
}
.kcc-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.kcc-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
}
.kcc-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 4px 8px;
}
.kcc-close:hover {
    color: #e2e8f0;
}

/* ── Category rows ── */
.kcc-category {
    padding: 16px 0;
    border-top: 1px solid #334155;
}
.kcc-category:first-of-type {
    border-top: none;
}
.kcc-cat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kcc-cat-name {
    font-weight: 600;
    color: #f1f5f9;
    font-size: 14px;
}
.kcc-cat-desc {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

/* ── Toggle switch ── */
.kcc-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.kcc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.kcc-toggle-slider {
    position: absolute;
    inset: 0;
    background: #475569;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.kcc-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #e2e8f0;
    border-radius: 50%;
    transition: transform 0.2s;
}
.kcc-toggle input:checked + .kcc-toggle-slider {
    background: #d4a843;
}
.kcc-toggle input:checked + .kcc-toggle-slider::after {
    transform: translateX(20px);
}
.kcc-toggle input:disabled + .kcc-toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}
.kcc-locked-label {
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}

/* ── Modal save button ── */
.kcc-btn-save {
    width: 100%;
    margin-top: 20px;
    background: #d4a843;
    color: #1e293b;
}
.kcc-btn-save:hover {
    background: #c49935;
}

/* ── RTL support ── */
[dir="rtl"] .kcc-inner {
    direction: rtl;
}
[dir="rtl"] .kcc-toggle-slider::after {
    left: auto;
    right: 3px;
}
[dir="rtl"] .kcc-toggle input:checked + .kcc-toggle-slider::after {
    transform: translateX(-20px);
}

/* ── Mobile ── */
@media (max-width: 640px) {
    .kcc-inner {
        flex-direction: column;
        text-align: center;
    }
    .kcc-actions {
        justify-content: center;
        width: 100%;
    }
    .kcc-btn-accept,
    .kcc-btn-necessary {
        flex: 1;
    }
    .kcc-modal {
        width: 95%;
        padding: 20px;
    }
}

/* ── Print: hide everything ── */
@media print {
    .kcc-banner,
    .kcc-overlay {
        display: none !important;
    }
}
