/* Cookie Consent — Bottom-left toast + preferences modal */

.coco-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9500;
    max-width: 380px;
    background: #1a1a1a;
    border: 1px solid rgba(201, 169, 110, 0.25);
    border-radius: 12px;
    padding: 20px;
    font-family: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e8e4dc;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transform: translateY(120%);
    transition: transform 0.4s ease;
}

.coco-consent *,
.coco-consent *::before,
.coco-consent *::after {
    box-sizing: border-box;
}

.coco-consent.is-visible {
    transform: translateY(0);
}

.coco-consent__title {
    font-size: 15px;
    font-weight: 700;
    color: #c9a96e;
    margin: 0 0 8px;
    line-height: 1.3;
}

.coco-consent__text {
    font-size: 13px;
    line-height: 1.5;
    color: #b0ab9f;
    margin: 0 0 16px;
}

.coco-consent__text a {
    color: #c9a96e;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.coco-consent__text a:hover {
    color: #d4b478;
}

.coco-consent__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.coco-consent__btn {
    padding: 9px 18px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.coco-consent__btn--accept {
    background: #c9a96e;
    color: #0d0d0d;
    flex: 1;
}

.coco-consent__btn--accept:hover {
    background: #d4b478;
}

.coco-consent__btn--reject {
    background: #2a2a2a;
    color: #b0ab9f;
    border: 1px solid #444;
}

.coco-consent__btn--reject:hover {
    border-color: #666;
    color: #e8e4dc;
}

.coco-consent__manage {
    background: none;
    border: none;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.coco-consent__manage:hover {
    color: #c9a96e;
}

/* ── Preferences modal ── */

.coco-consent-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9600;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.coco-consent-overlay.is-open {
    display: flex;
}

.coco-consent-modal {
    background: #1a1a1a;
    border: 1px solid rgba(201, 169, 110, 0.25);
    border-radius: 12px;
    max-width: 440px;
    width: 100%;
    padding: 28px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.coco-consent-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    color: #888;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.coco-consent-modal__close:hover {
    color: #e8e4dc;
}

.coco-consent-modal__title {
    font-size: 17px;
    font-weight: 700;
    color: #c9a96e;
    margin: 0 0 6px;
}

.coco-consent-modal__desc {
    font-size: 13px;
    color: #b0ab9f;
    margin: 0 0 20px;
    line-height: 1.5;
}

/* ── Category rows ── */

.coco-consent-cat {
    padding: 14px 0;
    border-top: 1px solid #2a2a2a;
}

.coco-consent-cat:last-of-type {
    border-bottom: 1px solid #2a2a2a;
    margin-bottom: 20px;
}

.coco-consent-cat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.coco-consent-cat__name {
    font-size: 14px;
    font-weight: 600;
    color: #e8e4dc;
}

.coco-consent-cat__desc {
    font-size: 12px;
    color: #888;
    margin: 4px 0 0;
    line-height: 1.4;
}

.coco-consent-cat__badge {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

/* Toggle switch */
.coco-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.coco-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.coco-toggle__slider {
    position: absolute;
    inset: 0;
    background: #333;
    border-radius: 22px;
    cursor: pointer;
    transition: background 0.2s;
}

.coco-toggle__slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    background: #888;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.coco-toggle input:checked + .coco-toggle__slider {
    background: rgba(201, 169, 110, 0.3);
}

.coco-toggle input:checked + .coco-toggle__slider::before {
    transform: translateX(18px);
    background: #c9a96e;
}

.coco-toggle input:disabled + .coco-toggle__slider {
    opacity: 0.5;
    cursor: default;
}

.coco-consent-modal__actions {
    display: flex;
    gap: 8px;
}

.coco-consent-modal__actions .coco-consent__btn {
    flex: 1;
}

/* ── Footer settings link ── */

.coco-consent-settings-link {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9400;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 11px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
    display: none;
    font-family: 'Sora', -apple-system, sans-serif;
}

.coco-consent-settings-link:hover {
    border-color: #c9a96e;
    color: #c9a96e;
}

.coco-consent-settings-link.is-visible {
    display: inline-block;
}

/* ── Mobile ── */

@media (max-width: 480px) {
    .coco-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }

    .coco-consent-modal {
        padding: 20px;
    }
}
