/* Cookie panel theme for andywebb.digital, on top of cookieconsent.css.
   Colours follow the @theme tokens in app/assets/tailwind/application.css. */
#cc-main {
  --cc-font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --cc-bg: #2d3238;
  --cc-primary-color: #e4e6e8;
  --cc-secondary-color: #b8bdc2;
  --cc-link-color: #4c9aff;
  --cc-btn-primary-bg: #4c9aff;
  --cc-btn-primary-color: #20242a;
  --cc-btn-primary-border-color: #4c9aff;
  --cc-btn-primary-hover-bg: #e4e6e8;
  --cc-btn-primary-hover-color: #20242a;
  --cc-btn-primary-hover-border-color: #e4e6e8;
  --cc-btn-secondary-bg: #24292f;
  --cc-btn-secondary-color: #e4e6e8;
  --cc-btn-secondary-border-color: #4a5058;
  --cc-btn-secondary-hover-bg: #3a4048;
  --cc-btn-secondary-hover-color: #ffffff;
  --cc-btn-secondary-hover-border-color: #4c9aff;
  --cc-separator-border-color: #3a4048;
  --cc-toggle-on-bg: #4c9aff;
  --cc-toggle-off-bg: #4a5058;
  --cc-toggle-on-knob-bg: #24292f;
  --cc-toggle-off-knob-bg: #e4e6e8;
  --cc-toggle-readonly-bg: #3a4048;
  --cc-toggle-readonly-knob-bg: #9aa0a6;
  --cc-cookie-category-block-bg: #24292f;
  --cc-cookie-category-block-border: #3a4048;
  --cc-cookie-category-block-hover-bg: #2a2f35;
  --cc-cookie-category-block-hover-border: #4a5058;
  --cc-section-category-border: #3a4048;
  --cc-overlay-bg: rgb(20 23 27 / 0.6);
  --cc-footer-bg: #24292f;
  --cc-footer-color: #b8bdc2;
  --cc-footer-border-color: #3a4048;
  --cc-modal-border-radius: 12px;
  --cc-btn-border-radius: 6px;
  --cc-z-index: 2147483647;
}

#cc-main .cm,
#cc-main .pm { border: 1px solid #3a4048; }

/* ---- First layer of the panel (#cc-main .cm), as on lodgesandcottages -----
   One big "Accept all", then "Necessary only" and "Manage choices" as two bold
   links side by side under it. Both are still real buttons with 44px targets,
   so refusing is one tap. The library puts Accept and Necessary in one group
   and Manage in another; display: contents lets one grid place all three.
   The preferences panel (.pm) keeps its equal buttons. */
#cc-main .cm .cm__title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
#cc-main .cm .cm__btns {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.25rem;
  row-gap: 4px;
  border-top: 0 !important;
  padding-top: 0.25rem;
}
#cc-main .cm .cm__btn-group { display: contents !important; }
#cc-main .cm .cm__btn { margin: 0 !important; }

#cc-main .cm .cm__btn[data-role="all"] {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px;
  border-radius: 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgb(76 154 255 / 0.25);
}
#cc-main .cm .cm__btn[data-role="all"]::before {
  content: "";
  width: 20px; height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat;
}

#cc-main .cm .cm__btn[data-role="necessary"],
#cc-main .cm .cm__btn[data-role="show"] {
  min-height: 44px;
  padding: 0 2px;
  background: none;
  border: 0;
  color: #e4e6e8;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#cc-main .cm .cm__btn[data-role="necessary"] { justify-self: end; }
#cc-main .cm .cm__btn[data-role="show"] { justify-self: start; }
#cc-main .cm .cm__btn[data-role="necessary"]:hover,
#cc-main .cm .cm__btn[data-role="show"]:hover { background: none; color: #4c9aff; }
