/* Cookie consent banner and settings modal (shared/tracking/cookie-consent.php).
   Loaded non-render-blocking on yellow.law (partials/head.php); the *.yellow.law
   landing sites inline this file through the partial instead. */
.ylw-cc-banner,
.ylw-cc-modal { font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #002A4D; }
/* The display:flex below would beat the hidden attribute; yellow.law gets this from
   Bootstrap's [hidden] rule, the landing sites (no Bootstrap) need it here. */
.ylw-cc-banner[hidden],
.ylw-cc-modal[hidden] { display: none !important; }

.ylw-cc-banner {
    position: fixed; left: 24px; bottom: 24px; z-index: 999998;
    width: 420px; max-width: calc(100vw - 32px);
    background: #ffffff; color: #002A4D;
    border: 1px solid #e8e8e8; border-radius: 14px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    transform: translateY(20px); opacity: 0;
    transition: transform .35s ease, opacity .35s ease;
}
.ylw-cc-banner[data-visible="true"] { transform: translateY(0); opacity: 1; }
.ylw-cc-body { padding: 22px 22px 20px; }
.ylw-cc-heading { font-family: var(--font-heading); font-size: 18px; font-weight: 700; line-height: 1.2; margin: 0 0 8px; color: #002A4D; }
.ylw-cc-text { font-size: 13.5px; line-height: 1.55; color: #4b5563; margin: 0 0 16px; }
.ylw-cc-link { color: #002A4D; text-decoration: underline; font-weight: 600; }
.ylw-cc-link:hover { color: #FFB31A; }
.ylw-cc-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.ylw-cc-btn {
    font-family: inherit; font-size: 13.5px; font-weight: 600;
    padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
    cursor: pointer; transition: all .18s ease; line-height: 1.2;
}
.ylw-cc-btn-primary { background: #002A4D; color: #ffffff; border-color: #002A4D; }
.ylw-cc-btn-primary:hover { background: #FFB31A; color: #002A4D; border-color: #FFB31A; }
.ylw-cc-btn-secondary { background: transparent; color: #002A4D; border-color: #002A4D; }
.ylw-cc-btn-secondary:hover { background: #002A4D; color: #ffffff; }
.ylw-cc-btn-link { background: transparent; color: #4b5563; border: none; padding: 10px 8px; text-decoration: underline; }
.ylw-cc-btn-link:hover { color: #002A4D; }

.ylw-cc-modal {
    position: fixed; inset: 0; z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.ylw-cc-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px); }
.ylw-cc-modal-panel {
    position: relative; width: 100%; max-width: 640px; max-height: 88vh;
    background: #ffffff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.25);
    display: flex; flex-direction: column;
}
.ylw-cc-modal-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid #e5e7eb; background: #ffffff; color: #002A4D;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .18s ease; z-index: 2;
}
.ylw-cc-modal-close:hover { background: #002A4D; color: #ffffff; border-color: #002A4D; }
.ylw-cc-modal-content { padding: 28px 28px 24px; overflow-y: auto; }
.ylw-cc-modal-heading { font-family: var(--font-heading); font-size: 22px; font-weight: 700; line-height: 1.2; margin: 0 0 12px; color: #002A4D; }
.ylw-cc-modal-intro { font-size: 14px; line-height: 1.6; color: #4b5563; margin: 0 0 22px; }

.ylw-cc-category { border: 1px solid #eef0f3; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; background: #F7F4EC; }
.ylw-cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.ylw-cc-cat-title { font-weight: 700; font-size: 14.5px; color: #002A4D; }
.ylw-cc-always { font-size: 12.5px; color: #6b7280; font-weight: 500; }
.ylw-cc-cat-desc { font-size: 13px; line-height: 1.55; color: #4b5563; }

.ylw-cc-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.ylw-cc-switch input { opacity: 0; width: 0; height: 0; }
.ylw-cc-slider {
    position: absolute; inset: 0; background: #d1d5db; border-radius: 999px;
    transition: background .2s ease; cursor: pointer;
}
.ylw-cc-slider::before {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; background: #ffffff; border-radius: 50%;
    transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.ylw-cc-switch input:checked + .ylw-cc-slider { background: #FFB31A; }
.ylw-cc-switch input:checked + .ylw-cc-slider::before { transform: translateX(18px); }
.ylw-cc-switch input:focus-visible + .ylw-cc-slider { outline: 2px solid #FFB31A; outline-offset: 2px; }

.ylw-cc-modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #eef0f3; }

@media (max-width: 640px) {
    .ylw-cc-banner { left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; border-radius: 14px 14px 0 0; border-left: none; border-right: none; border-bottom: none; }
    .ylw-cc-body { padding: 18px 18px 18px; }
    .ylw-cc-heading { font-size: 16.5px; }
    .ylw-cc-text { font-size: 13px; margin-bottom: 12px; }
    .ylw-cc-actions { gap: 6px; }
    .ylw-cc-btn { padding: 9px 14px; font-size: 13px; }
    .ylw-cc-btn-link { padding: 9px 6px; }
    .ylw-cc-modal-content { padding: 22px 18px 18px; }
    .ylw-cc-modal-heading { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .ylw-cc-banner { transition: none; }
}
