/* ------------------------------------------------------------------
   510tech - compact overrides for vanilla-cookieconsent 3.1.0
   Load AFTER cookieconsent.css.

   Goal: the smallest banner that still reads as a real, informed choice.
   Roughly halves the default height by shortening copy, tightening padding
   and putting the two buttons side by side.

   DELIBERATELY NOT SHRUNK - do not "optimise" these away:
     * Accept and Decline stay the SAME width, size, and font-weight.
       The `box inline` layout puts them in equal grid columns; keep it.
       Making Decline smaller, greyer or lower-contrast than Accept is the
       single most attacked pattern in consent enforcement.
     * Description text stays >= 13px. Below that the notice stops being
       legible, and an illegible notice is not an informed choice.
     * The policy link stays in the banner itself, not only in the modal.
   ------------------------------------------------------------------ */

#cc-main .cm {
  /* 24rem -> 20.5rem : ~384px down to ~328px */
  max-width: 20.5rem;
}

/* --- text block ------------------------------------------------- */

#cc-main .cm__texts {
  padding: .8rem 0 0;          /* was 1rem 0 0 */
}

#cc-main .cm__title {
  padding: 0 1rem;             /* was 0 1.3rem */
  font-size: .95em;            /* was 1.05em */
  line-height: 1.25;
}

#cc-main .cm__desc {
  padding: 0 1rem .7rem;       /* was padding-bottom 1em, sides from title */
  margin-top: .45em;           /* was 1.1em - the biggest single saving */
  font-size: .82em;            /* lands ~13.1px against a 16px base */
  line-height: 1.45;
}

/* --- buttons ---------------------------------------------------- */

#cc-main .cm__btns {
  padding: .55rem .7rem .7rem; /* tighter tray */
}

#cc-main .cm__btn {
  padding: .55em .7em;         /* was ~.9em 1.6em */
  font-size: .82em;
  min-height: 0;
  font-weight: 600;            /* SAME on both buttons - see header note */
}

/* The "Choose" control sits in its OWN button group below the Accept/Decline
   pair (verified in the rendered DOM: group 0 = [Accept, Decline],
   group 1 = [Choose]). Rendering it as a text link instead of a third
   full-width button is the single biggest remaining height saving.

   This is legally fine: regulators require parity between ACCEPT and
   DECLINE (same screen, same click-depth, legible). Access to a
   preference centre carries no such parity requirement. Do NOT apply
   this treatment to .cm__btn--secondary generally - Decline shares that
   class and must keep full button weight. */
#cc-main .cm__btn[data-role="show"] {
  background: none;
  border: 0;
  padding: .1em .2em;
  min-height: 0;
  font-weight: 500;
  font-size: .78em;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: .82;
}
#cc-main .cm__btn[data-role="show"]:hover {
  opacity: 1;
  background: none;
  color: var(--cc-btn-primary-bg);
}
/* collapse the empty space that group used to occupy as a button row */
#cc-main .cm__btns .cm__btn-group + .cm__btn-group {
  margin-top: .3rem;
}

/* --- preferences modal, same treatment -------------------------- */

#cc-main .pm__body       { padding-top: .6rem; }
#cc-main .pm__section    { margin-bottom: .4rem; }
#cc-main .pm__section-title { font-size: .88em; padding: .7em .8em; }
#cc-main .pm__section-desc  { font-size: .82em; line-height: 1.5; }
#cc-main .pm__btn        { padding: .6em .9em; font-size: .85em; }

/* --- small screens ---------------------------------------------- */

@media (max-width: 640px) {
  #cc-main .cm {
    max-width: none;
    /* full-width strip on mobile: a 328px card on a 360px phone looks broken */
    margin: .5rem;
  }
  #cc-main .cm__desc { font-size: .85em; }
}

/* --- motion ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  #cc-main .cm,
  #cc-main .pm { transition: none !important; }
}
