
:root{--tb-banner-accent:#0d6efd;--tb-banner-text:#17233d;--tb-banner-muted:#667085;--tb-banner-surface:#fff;--tb-banner-border:#e5eaf2;--tb-banner-bar-bg:#f4f1e6;--tb-banner-bar-border:#e3ddc8;--tb-banner-bar-text:#1c1c1c}

.tb-banner-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.28);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);z-index:var(--z-modal-backdrop, 99997);opacity:0;pointer-events:none;transition:opacity .4s ease}
.tb-banner-backdrop.show{opacity:1;pointer-events:auto}
.tb-banner-backdrop.tb-backdrop-behind-banner{background:rgba(20,20,15,.12);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);pointer-events:none}

.tb-banner-bar,.tb-notice-modal{font-family:inherit;box-sizing:border-box}
.tb-banner-bar{position:fixed;left:0;right:0;bottom:0;width:100%;background:var(--tb-banner-bar-bg);border-top:1px solid var(--tb-banner-bar-border);box-shadow:0 -8px 30px rgba(15,23,42,.10);z-index:var(--z-sticky, 99998);padding:20px 48px calc(16px + env(safe-area-inset-bottom));display:none;flex-direction:column;gap:12px;color:var(--tb-banner-bar-text)}
.tb-banner-bar.show{display:flex;animation:tbBannerSlideUp .5s cubic-bezier(.19,1,.22,1)}
.tb-banner-bar.tb-banner-leave{animation:tbBannerSlideDown .38s cubic-bezier(.4,0,.6,1) forwards}

.tb-banner-row{display:flex;gap:22px;align-items:center;justify-content:space-between;flex-wrap:wrap;max-width:1440px;margin:0 auto;width:100%}
.tb-banner-icon{flex:0 0 auto;width:40px;height:40px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 14px rgba(15,23,42,.12);animation:tbCookieWiggle 2.6s ease-in-out .6s 1}
.tb-banner-copy{flex:1;min-width:280px}
.tb-banner-title{margin:0 0 4px;font-size:17px;font-weight:800}
.tb-banner-text{margin:0;color:#3d3d3d;font-size:13.5px;line-height:1.5}
.tb-banner-bar .tb-banner-text{color:#3d3d3d}
.tb-banner-link{color:inherit;font-weight:800;text-decoration:underline}

.tb-banner-actions{display:flex;gap:12px;flex-wrap:wrap;flex:0 0 auto}
.tb-banner-btn{border:0;border-radius:var(--radius-md, 10px);padding:10px 20px;font:inherit;font-size:13.5px;font-weight:700;cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,background-color .18s ease;white-space:nowrap}
.tb-banner-btn:hover{transform:translateY(-1px)}
.tb-banner-btn:active{transform:translateY(0) scale(.96)}
.tb-banner-primary{background:var(--tb-banner-accent);color:#fff;box-shadow:0 2px 0 rgba(0,0,0,0)}
.tb-banner-primary:hover{box-shadow:0 8px 18px rgba(13,110,253,.28)}
.tb-banner-secondary{background:#eef4ff;color:#1557d6}
.tb-banner-bar .tb-banner-ghost{background:transparent;color:#1c1c1c;border:1px solid #c9c2a8}
.tb-notice-modal .tb-banner-ghost{background:#f5f7fa;color:#344054}

.tb-banner-manage{align-self:flex-start;background:none;border:0;padding:0;margin:0;font:inherit;font-size:13px;font-weight:800;color:#1c1c1c;cursor:pointer;display:inline-flex;align-items:center;gap:6px;text-decoration:none;transition:gap .18s ease}
.tb-banner-manage:hover{text-decoration:underline;gap:9px}

.tb-notice-modal{position:fixed;z-index:var(--z-modal, 99999);left:50%;top:50%;transform:translate(-50%,-46%) scale(.96);width:min(560px,calc(100% - 28px));max-height:86vh;overflow:auto;background:#fff;color:var(--tb-banner-text);border-radius:22px;box-shadow:0 28px 90px rgba(15,23,42,.28);padding:24px;opacity:0;pointer-events:none;transition:opacity .28s ease,transform .32s cubic-bezier(.2,1.2,.4,1)}
.tb-notice-modal.show{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}
.tb-notice-modal-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.tb-notice-modal h2{margin:0;font-size:22px}
.tb-notice-modal .tb-banner-text{color:var(--tb-banner-muted)}
.tb-notice-close{border:0;background:#f2f4f7;width:36px;height:36px;border-radius:50%;cursor:pointer;font-size:18px;transition:transform .18s ease,background-color .18s ease}
.tb-notice-close:hover{background:#e6e9ef;transform:rotate(90deg)}

.tb-notice-option{display:flex;gap:14px;justify-content:space-between;padding:16px 0;border-top:1px solid var(--tb-banner-border)}
.tb-notice-option:first-of-type{margin-top:18px}
.tb-notice-option h3{margin:0 0 4px;font-size:15px}
.tb-notice-option p{margin:0;color:var(--tb-banner-muted);font-size:13px;line-height:1.45}
.tb-notice-always{font-size:12px;font-weight:800;color:#087443}

.tb-notice-switch{position:relative;width:46px;height:26px;flex:0 0 auto}
.tb-notice-switch input{opacity:0;width:0;height:0}
.tb-notice-slider{position:absolute;inset:0;background:#cfd6e2;border-radius:99px;cursor:pointer;transition:background-color .25s ease}
.tb-notice-slider:before{content:"";position:absolute;width:20px;height:20px;left:3px;top:3px;background:#fff;border-radius:50%;transition:transform .25s cubic-bezier(.34,1.56,.64,1),box-shadow .2s ease;box-shadow:0 1px 4px rgba(0,0,0,.2)}
.tb-notice-switch input:checked+.tb-notice-slider{background:var(--tb-banner-accent)}
.tb-notice-switch input:checked+.tb-notice-slider:before{transform:translateX(20px)}
.tb-notice-switch input:focus-visible+.tb-notice-slider{outline:2px solid var(--tb-banner-accent);outline-offset:2px}

.tb-notice-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px;flex-wrap:wrap}

/* "Manage Cookies" re-open pill — shown once a choice has been saved. */
.tb-banner-reopen{position:fixed;right:16px;bottom:16px;z-index:99990;border:1px solid var(--tb-banner-border);background:#fff;color: var(--text-primary, #17233d);border-radius: var(--radius-md, 12px);padding:9px 16px;box-shadow:0 8px 24px rgba(15,23,42,.12);font:inherit;font-size:12px;font-weight:700;cursor:pointer;display:none;align-items:center;gap:8px;transition:transform .18s ease,box-shadow .18s ease}
.tb-banner-reopen svg{flex:0 0 auto; color: var(--tb-banner-accent); }
.tb-banner-reopen.show{display:inline-flex;animation:tbReopenPop .4s cubic-bezier(.2,1.4,.4,1)}
.tb-banner-reopen:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(15,23,42,.18)}
.tb-banner-reopen:active{transform:translateY(0) scale(.96)}

/* Helper to hide cookie pill on dashboards */
body.tb-hide-cookie-pill .tb-banner-reopen {
  display: none !important;
}

@keyframes tbBannerSlideUp{from{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}
@keyframes tbBannerSlideDown{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(100%)}}
@keyframes tbReopenPop{0%{opacity:0;transform:scale(.5) translateY(10px)}70%{opacity:1;transform:scale(1.06) translateY(0)}100%{opacity:1;transform:scale(1) translateY(0)}}
@keyframes tbCookieWiggle{0%,100%{transform:rotate(0)}15%{transform:rotate(-12deg)}30%{transform:rotate(10deg)}45%{transform:rotate(-6deg)}60%{transform:rotate(4deg)}75%{transform:rotate(0)}}

@media(max-width:760px){
  .tb-banner-bar{padding:18px 16px 16px}
  .tb-banner-row{flex-direction:column;align-items:stretch;gap:14px}
  .tb-banner-icon{display:none}
  .tb-banner-actions{justify-content:stretch}
  .tb-banner-btn{flex:1}
  .tb-banner-reopen{right:10px;bottom:10px}
}
@media(max-width:760px){
  .tb-notice-modal{left:12px;right:12px;top:12px;bottom:12px;transform:none;width:auto;max-height:none}
  .tb-notice-modal.show{transform:none}
}
@media(prefers-reduced-motion:reduce){
  .tb-banner-bar.show,.tb-banner-bar.tb-banner-leave,.tb-banner-reopen.show,.tb-banner-icon{animation:none}
  .tb-notice-modal{transition:opacity .15s ease}
}
