:root{
  --ccc-bg: rgba(18,18,20,.96);
  --ccc-panel: #1f1f22;
  --ccc-border: rgba(255,255,255,.08);
  --ccc-text: #f5f5f7;
  --ccc-muted: rgba(255,255,255,.72);
  --ccc-accent: #ffb400;
  --ccc-accent-text: #111;
  --ccc-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.ccc-hidden{display:none !important;}
.ccc-trigger{
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 2147483000;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--ccc-accent);
  background: var(--ccc-panel);
  color: var(--ccc-accent);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: var(--ccc-shadow);
  cursor:pointer;
  transition: transform .2s ease, opacity .2s ease, background-color .2s ease;
  font-size: 24px;
}
.ccc-trigger:hover{transform: translateY(-2px);}
.ccc-trigger:focus-visible{outline: 2px solid #fff; outline-offset: 2px;}
.ccc-banner{
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2147482998;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 20px;
  padding: 20px 22px;
  background: var(--ccc-bg);
  color: var(--ccc-text);
  border: 1px solid var(--ccc-border);
  border-radius: 22px;
  box-shadow: var(--ccc-shadow);
  backdrop-filter: blur(12px);
}
.ccc-banner__text{max-width:760px; font-size:15px; line-height:1.5;}
.ccc-banner__actions{display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-end;}
.ccc-btn{
  appearance:none; border:0; border-radius:999px; padding:12px 18px; font:inherit; font-weight:600;
  cursor:pointer; transition: transform .15s ease, opacity .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.ccc-btn:hover{transform: translateY(-1px);}
.ccc-btn:focus-visible{outline:2px solid #fff; outline-offset:2px;}
.ccc-btn--primary{background: var(--ccc-accent); color: var(--ccc-accent-text);}
.ccc-btn--ghost{background: transparent; color: var(--ccc-text); border: 1px solid var(--ccc-border);}
.ccc-modal{position: fixed; inset:0; z-index:2147483001;}
.ccc-backdrop{position:absolute; inset:0; background: rgba(0,0,0,.56); backdrop-filter: blur(6px);}
.ccc-panel{
  position: relative; width: min(680px, calc(100vw - 24px)); margin: 24px auto; background: var(--ccc-panel);
  color: var(--ccc-text); border:1px solid var(--ccc-border); border-radius:26px; box-shadow: var(--ccc-shadow); padding:28px;
}
.ccc-close{
  position:absolute; top:16px; right:16px; width:44px; height:44px; border-radius:14px;
  border:1px solid var(--ccc-border); background: transparent; color: var(--ccc-text); font-size:30px; line-height:1; cursor:pointer;
}
.ccc-title{margin:0 56px 10px 0; font-size:30px; line-height:1.2; font-weight:700;}
.ccc-intro{margin:0 0 22px; color: var(--ccc-muted); font-size:15px; line-height:1.55;}
.ccc-row{
  display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:20px 0; border-top:1px solid var(--ccc-border);
}
.ccc-row:first-of-type{border-top:0;}
.ccc-row__title{margin:0 0 8px; font-size:17px; line-height:1.35; font-weight:700;}
.ccc-row__desc{margin:0; color: var(--ccc-muted); font-size:14px; line-height:1.55; max-width:520px;}
.ccc-footer{display:flex; justify-content:flex-end; gap:12px; flex-wrap:wrap; padding-top:22px; border-top:1px solid var(--ccc-border); margin-top:10px;}
.ccc-switch{position:relative; width:56px; height:32px; flex:0 0 auto;}
.ccc-switch input{opacity:0; width:0; height:0;}
.ccc-slider{position:absolute; inset:0; border-radius:999px; background:#51545d; transition:.2s ease;}
.ccc-slider::before{
  content:""; position:absolute; width:24px; height:24px; left:4px; top:4px; border-radius:50%; background:#fff; transition:.2s ease;
}
.ccc-switch input:checked + .ccc-slider{background:#2186ff;}
.ccc-switch input:checked + .ccc-slider::before{transform: translateX(24px);}
.ccc-switch input:disabled + .ccc-slider{background:#75777f; opacity:.95;}
body.theme-dark .ccc-panel, html[data-theme="dark"] body .ccc-panel{background:#1d1d21;}
body.theme-dark .ccc-banner, html[data-theme="dark"] body .ccc-banner{background: rgba(17,17,19,.96);}
@media (max-width:760px){
  .ccc-banner{left:12px; right:12px; bottom:12px; flex-direction:column; align-items:stretch;}
  .ccc-trigger{right:16px; bottom:86px;}
  .ccc-panel{width:min(680px, calc(100vw - 16px)); margin:8px auto; padding:22px 16px; border-radius:20px; max-height:calc(100vh - 16px); overflow:auto;}
  .ccc-title{font-size:24px;}
  .ccc-row{gap:12px;}
  .ccc-footer, .ccc-banner__actions{flex-direction:column;}
  .ccc-btn{width:100%;}
}


/* v8 mobile/overlay conflict fixes */
body.ccc-scroll-lock{
  position: fixed;
  overflow: hidden;
  width: 100%;
  left: 0;
  right: 0;
}
html.ccc-modal-open,
body.ccc-modal-open{
  overscroll-behavior: none;
}
.ccc-modal[aria-hidden="true"]{
  pointer-events: none;
}
.ccc-modal:not(.ccc-hidden){
  pointer-events: auto;
}
.ccc-trigger{
  right: var(--cc-floating-right, 24px);
  bottom: calc(var(--cc-floating-bottom, 24px) + 54px);
  z-index: 2147482998;
  touch-action: manipulation;
}
html.ccc-has-banner .ccc-trigger,
body.ccc-has-banner .ccc-trigger{
  opacity: 0;
  pointer-events: none;
}
html.ccc-modal-open .ccc-trigger,
body.ccc-modal-open .ccc-trigger{
  opacity: 0;
  pointer-events: none;
}
.ccc-banner{
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
}
.ccc-panel{
  max-height: min(760px, calc(100dvh - 16px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width:760px){
  .ccc-trigger{
    right: var(--cc-floating-right, 16px);
    bottom: calc(var(--cc-floating-bottom, 16px) + 58px);
  }
  .ccc-banner{
    max-height: min(42vh, 320px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}


/* v12: mobile fixed-action stack.
   Cookie trigger stays at the bottom-right; theme toggle sits above it. */
@media (max-width: 760px){
  .ccc-trigger{
    right: 16px !important;
    bottom: 16px !important;
    z-index: 2147483000 !important;
    transform: none !important;
  }
  html.cloudcrew-cookie-modal-open .ccc-trigger{
    display: none !important;
  }
}

/* Touch polish */
.ccc-trigger{
  touch-action: manipulation;
}
