/* Cookie Consent visual overrides — match PromoAzi pattern.
 * Loaded AFTER vanilla-cookieconsent v3 CSS in index.html so these win.
 *
 * Library DOM:
 *   .cm__body  (flex column)
 *     .cm__texts
 *     .cm__btns
 *       .cm__btn-group.cm__btn-group--uneven
 *         button.cm__btn                            (Accept all)
 *         button.cm__btn.cm__btn--secondary         (Doar esențiale)
 *       .cm__btn-group
 *         button.cm__btn.cm__btn--secondary         (Preferințe)
 *     .cm__footer
 *       a                                           (Confidențialitate)
 *
 * Layout:
 * - .cm__btns becomes a flex-row-wrap container.
 * - .cm__btn-group + .cm__btn-group--uneven become display:contents so
 *   Accept + Doar esențiale + Preferințe become direct flex children of
 *   .cm__btns. Accept gets flex:100% (own row); the two secondaries flow
 *   inline on row 2 centered.
 * - .cm__footer stays where it is (separate sibling of .cm__btns inside
 *   .cm__body). Restyled to look like a centered third grey link.
 */

/* Card width — library default 24rem (384px) is too narrow. */
#cc-main .cm {
  border-radius: 16px !important;
  width: min(560px, calc(100vw - 2rem)) !important;
  max-width: 560px !important;
  padding: 1.5rem 1.75rem 1.25rem !important;
}

/* Body internals — let library flex-column stand; tighten gap. */
#cc-main .cm__body {
  gap: 0.5rem !important;
  padding: 0 !important;
}

/* Texts spacing tweak. */
#cc-main .cm__texts {
  margin-bottom: 0 !important;
}

/* Btns container = ROW WRAP. Beats library's
 *   #cc-main .cm--box.cm--wide .cm__btns { flex-direction: row; justify-content: space-between }
 * via !important. */
#cc-main .cm__btns {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.4rem 0.6rem !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

/* Flatten BOTH btn-groups so their button children become direct flex children
 * of .cm__btns. High-specificity selectors below match the library's own
 * selectors so we win the cascade outright. */
#cc-main .cm--wide .cm__btn-group,
#cc-main .cm--wide .cm__btn-group--uneven,
#cc-main .cm--bar:not(.cm--inline) .cm__btn-group--uneven,
#cc-main .cm--box.cm--wide .cm__btn-group,
#cc-main .cm__btn-group,
#cc-main .cm__btn-group--uneven {
  display: contents !important;
}

/* Accept = navy pill, full width of btns row, centered. */
#cc-main .cm__btn:not(.cm__btn--secondary):not(.cm__btn--close) {
  flex: 0 0 100% !important;
  width: 90% !important;
  max-width: 480px !important;
  margin: 0 auto !important;
  padding: 0.7rem 1.5rem !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  border-radius: 999px !important;
  background: var(--brand-navy, #253b6d) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(233, 116, 32, 0.25) !important;
  transition: filter 0.15s ease, box-shadow 0.15s ease !important;
}

#cc-main .cm__btn:not(.cm__btn--secondary):not(.cm__btn--close):hover,
#cc-main .cm__btn:not(.cm__btn--secondary):not(.cm__btn--close):focus-visible {
  filter: brightness(1.08);
  box-shadow: 0 4px 12px rgba(233, 116, 32, 0.35) !important;
  outline: none;
}

/* Secondaries = grey link-style, auto width, sit centered on row 2 of .cm__btns. */
#cc-main .cm__btn--secondary {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
  background: transparent !important;
  border: none !important;
  color: var(--brand-slate, #668fa7) !important;
  padding: 0.15rem 0.35rem !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  transition: color 0.15s ease;
}

#cc-main .cm__btn--secondary:hover,
#cc-main .cm__btn--secondary:focus-visible {
  color: var(--brand-navy, #253b6d) !important;
  background: transparent !important;
  text-decoration: underline !important;
  outline: none;
}

/* Middle-dot separator between the two inline grey secondaries.
 * Row reads: Doar esențiale · Preferințe */
#cc-main .cm__btns .cm__btn--secondary + .cm__btn--secondary::before {
  content: '·';
  color: #d1d5db;
  margin-right: 0.5rem;
  font-size: 0.85rem;
}

/* Footer is unused now (no privacy link). Hide it so it doesn't reserve space. */
#cc-main .cm__footer {
  display: none !important;
}
