/* CIR Tracking — Cookie Consent V1 (Corner Card) */

:root {
    --cir-cookie-gold: #C5A467;
    --cir-cookie-gold-dark: #A88847;
    --cir-cookie-ink: #1d2327;
    --cir-cookie-ink-light: #555;
    --cir-cookie-cream: #fafaf7;
    --cir-cookie-line: #e5e1d6;
}

#cir-cookie-card {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.06);
    border-top: 3px solid var(--cir-cookie-gold);
    padding: 22px 24px 20px;
    z-index: 9999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: var(--cir-cookie-ink);
    display: none;
}

#cir-cookie-card.cir-cookie-show {
    display: block;
    animation: cirCookieSlideIn 0.5s ease-out 0.6s both;
}

@keyframes cirCookieSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

#cir-cookie-card h3 {
    font-family: 'Playfair Display', Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 8px;
    color: var(--cir-cookie-ink);
    line-height: 1.2;
}
#cir-cookie-card p {
    color: var(--cir-cookie-ink-light);
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.5;
}

.cir-cookie-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.cir-cookie-btn {
    padding: 10px 18px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    font-family: inherit;
    line-height: 1;
    text-decoration: none;
}
.cir-cookie-btn-primary {
    background: var(--cir-cookie-gold);
    color: #fff;
    flex: 1;
    min-width: 0;
    text-align: center;
}
.cir-cookie-btn-primary:hover { background: var(--cir-cookie-gold-dark); color: #fff; }
.cir-cookie-btn-ghost {
    background: transparent;
    color: var(--cir-cookie-ink);
    border: 1px solid var(--cir-cookie-line);
}
.cir-cookie-btn-ghost:hover { background: var(--cir-cookie-cream); color: var(--cir-cookie-ink); }
.cir-cookie-btn-link {
    background: none;
    border: none;
    color: var(--cir-cookie-ink-light);
    text-decoration: underline;
    font-size: 11px;
    padding: 0;
    margin-left: auto;
    cursor: pointer;
    font-family: inherit;
    text-transform: none;
    letter-spacing: 0;
}
.cir-cookie-btn-link:hover { color: var(--cir-cookie-ink); }

/* Settings modal */
#cir-cookie-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#cir-cookie-modal.cir-cookie-show { display: flex; }

.cir-cookie-modal-inner {
    background: #fff;
    border-radius: 6px;
    width: 480px;
    max-width: 100%;
    padding: 32px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.cir-cookie-modal-inner h2 {
    font-family: 'Playfair Display', Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 8px;
    line-height: 1.2;
}
.cir-cookie-modal-inner > p {
    color: var(--cir-cookie-ink-light);
    margin: 0 0 22px;
    font-size: 13px;
    line-height: 1.5;
}

.cir-cookie-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--cir-cookie-line);
}
.cir-cookie-row:last-of-type {
    border-bottom: 1px solid var(--cir-cookie-line);
    margin-bottom: 22px;
}
.cir-cookie-row-text { flex: 1; }
.cir-cookie-row-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--cir-cookie-ink);
}
.cir-cookie-row-text span {
    color: var(--cir-cookie-ink-light);
    font-size: 12px;
    line-height: 1.5;
    display: block;
}
.cir-cookie-row-text small {
    color: #999;
    font-size: 11px;
    display: block;
    margin-top: 6px;
}

.cir-cookie-toggle {
    position: relative;
    width: 40px;
    height: 22px;
    background: #ddd;
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-top: 2px;
    border: none;
    padding: 0;
}
.cir-cookie-toggle.on { background: var(--cir-cookie-gold); }
.cir-cookie-toggle.locked { background: var(--cir-cookie-gold); opacity: 0.5; cursor: not-allowed; }
.cir-cookie-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.cir-cookie-toggle.on::after,
.cir-cookie-toggle.locked::after { left: 20px; }

.cir-cookie-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.cir-cookie-modal-actions .cir-cookie-btn-primary { flex: 0 0 auto; }

/* Persistent reopen-link in the page footer (optional, themes can target this). */
.cir-cookie-reopen {
    background: none;
    border: none;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

/* Mobile */
@media (max-width: 480px) {
    #cir-cookie-card {
        bottom: 12px;
        right: 12px;
        left: 12px;
        width: auto;
        padding: 18px 18px 16px;
    }
    .cir-cookie-modal-inner { padding: 24px; }
}
