
/* BlushBloom palette extension 1.0.1: compact footer palette, independent of phpBB dropdowns. */
#page-footer .copyright { position: relative; }
.bb-palette-footer { position: relative; display: flex; justify-content: flex-end; margin: 8px 8px 0; text-align: left; z-index: 40; }
#page-footer .bb-palette-toggle {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 6px 11px; min-height: 34px; background: #fff5fa; color: #a42b69;
  border: 1px solid #e9c6d8; border-radius: 10px;
  font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; box-shadow: 0 2px 8px rgba(133,38,82,.075);
}
#page-footer .bb-palette-toggle .icon { color: inherit; }
#page-footer .bb-palette-toggle:hover, #page-footer .bb-palette-toggle[aria-expanded="true"] {
  background: #ffe6f0; color: #81254d; border-color: #d983a9;
}
#page-footer .bb-palette-panel {
  position: absolute; bottom: calc(100% + 8px); right: 0;
  width: 320px; max-width: calc(100vw - 34px); z-index: 150;
  background: #fff; color: #382e3a; border: 1px solid #ead0de;
  border-radius: 15px; padding: 15px; box-shadow: 0 12px 34px rgba(58,26,44,.18);
}
#page-footer .bb-palette-panel[hidden] { display: none !important; }
#page-footer .bb-palette-title { font-size: 14px; font-weight: 750; color: #782553; margin-bottom: 13px; }
#page-footer .bb-palette-choices { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
#page-footer .bb-palette-choices button {
  display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0;
  border: 1px solid #e8dae2; border-radius: 10px; background: #fff; padding: 9px 3px;
  font-family: inherit; font-size: 11px; font-weight: 600; line-height: 1.3; color: #5a4659; cursor: pointer;
}
#page-footer .bb-palette-choices button[aria-pressed="true"] { border: 2px solid #bc367e; background: #fff5f9; padding: 8px 2px; }
#page-footer .bb-palette-choices button:hover { border-color: #bb367e; background: #fff8fa; }
#page-footer .bb-palette-choices button:focus-visible, #page-footer .bb-palette-toggle:focus-visible { outline: 3px solid #bd367e; outline-offset: 2px; }
#page-footer .bb-swatch { display: block; height: 28px; width: 42px; max-width: 95%; border-radius: 8px; border: 1px solid rgba(0,0,0,.07); }
.bb-swatch-original { background: linear-gradient(120deg,#d82c7c 55%,#ffe451 55%); }
.bb-swatch-ocean { background: linear-gradient(120deg,#2089bf 55%,#75d8cc 55%); }
.bb-swatch-forest { background: linear-gradient(120deg,#188e68 55%,#f2d077 55%); }
.bb-swatch-lavender { background: linear-gradient(120deg,#8060b9 55%,#f2c589 55%); }
.bb-swatch-sunset { background: linear-gradient(120deg,#cb603a 55%,#ffe29a 55%); }
.bb-swatch-slate { background: linear-gradient(120deg,#526c80 55%,#b6dcd1 55%); }
#page-footer .bb-palette-hint { color: #74616e; font-size: 11px; margin: 11px 0 0; line-height: 1.4; }
@media (max-width: 650px) {
  .bb-palette-footer { justify-content: center; margin: 14px 0 2px; }
  #page-footer .bb-palette-panel { right: 50%; transform: translateX(50%); }
}

/* Keep the palette switcher itself in the chosen colour family. */
:root {
  --bb-picker-accent: #bd2670;
  --bb-picker-dark: #7d2858;
  --bb-picker-outline: #e9c6d8;
  --bb-picker-soft: #fff5fa;
  --bb-picker-hover: #ffe6f0;
}
html[data-blush-palette="ocean"] { --bb-picker-accent:#2875a9; --bb-picker-dark:#205675; --bb-picker-outline:#c4ddec; --bb-picker-soft:#f0f8ff; --bb-picker-hover:#e2f1fa; }
html[data-blush-palette="forest"] { --bb-picker-accent:#28785b; --bb-picker-dark:#1d6049; --bb-picker-outline:#c8e4da; --bb-picker-soft:#f0faf5; --bb-picker-hover:#e3f4ec; }
html[data-blush-palette="lavender"] { --bb-picker-accent:#7655a6; --bb-picker-dark:#533b7c; --bb-picker-outline:#ded2ef; --bb-picker-soft:#faf6ff; --bb-picker-hover:#f0e7fb; }
html[data-blush-palette="sunset"] { --bb-picker-accent:#b04b31; --bb-picker-dark:#853b27; --bb-picker-outline:#f0d7cf; --bb-picker-soft:#fff7f2; --bb-picker-hover:#ffeadc; }
html[data-blush-palette="slate"] { --bb-picker-accent:#4e667a; --bb-picker-dark:#344859; --bb-picker-outline:#d3e0e5; --bb-picker-soft:#f4f8fa; --bb-picker-hover:#e7f0f2; }
#page-footer .bb-palette-toggle { background:var(--bb-picker-soft); color:var(--bb-picker-accent); border-color:var(--bb-picker-outline); }
#page-footer .bb-palette-toggle:hover, #page-footer .bb-palette-toggle[aria-expanded="true"] { background:var(--bb-picker-hover); color:var(--bb-picker-dark); border-color:var(--bb-picker-accent); }
#page-footer .bb-palette-title { color:var(--bb-picker-dark); }
#page-footer .bb-palette-choices button[aria-pressed="true"] { border-color:var(--bb-picker-accent); background:var(--bb-picker-soft); }
#page-footer .bb-palette-choices button:hover { border-color:var(--bb-picker-accent); background:var(--bb-picker-soft); }
#page-footer .bb-palette-choices button:focus-visible, #page-footer .bb-palette-toggle:focus-visible { outline-color:var(--bb-picker-accent); }

/* Three additional swatches; a 3 x 3 grid still fits narrow phones. */
.bb-swatch-mint { background: linear-gradient(120deg,#159f9a 55%,#c8e778 55%); }
.bb-swatch-midnight { background: linear-gradient(120deg,#132943 55%,#6bd8ee 55%); }
.bb-swatch-nightrose { background: linear-gradient(120deg,#382139 55%,#f0a7d0 55%); }
html[data-blush-palette="mint"] { --bb-picker-accent:#178c86; --bb-picker-dark:#15635f; --bb-picker-outline:#c4e5df; --bb-picker-soft:#effcf9; --bb-picker-hover:#e0f5ec; }
html[data-blush-palette="midnight"] { --bb-picker-accent:#7ee6f6; --bb-picker-dark:#eaf8ff; --bb-picker-outline:#456079; --bb-picker-soft:#20324a; --bb-picker-hover:#304b62; }
html[data-blush-palette="nightrose"] { --bb-picker-accent:#ffb4da; --bb-picker-dark:#ffedf8; --bb-picker-outline:#694861; --bb-picker-soft:#36283d; --bb-picker-hover:#49354d; }
html[data-blush-palette="midnight"] #page-footer .bb-palette-panel,
html[data-blush-palette="nightrose"] #page-footer .bb-palette-panel { background:var(--bb-night-card); color:var(--bb-night-text); border-color:var(--bb-night-edge); }
html[data-blush-palette="midnight"] #page-footer .bb-palette-choices button,
html[data-blush-palette="nightrose"] #page-footer .bb-palette-choices button { background:var(--bb-night-input); color:var(--bb-night-text); border-color:var(--bb-night-edge); }
html[data-blush-palette="midnight"] #page-footer .bb-palette-choices button[aria-pressed="true"],
html[data-blush-palette="nightrose"] #page-footer .bb-palette-choices button[aria-pressed="true"] { background:var(--bb-picker-hover); border-color:var(--bb-picker-accent); }
html[data-blush-palette="midnight"] #page-footer .bb-palette-choices button:hover,
html[data-blush-palette="nightrose"] #page-footer .bb-palette-choices button:hover { background:var(--bb-picker-hover); color:var(--bb-night-text); }
html[data-blush-palette="midnight"] #page-footer .bb-palette-hint,
html[data-blush-palette="nightrose"] #page-footer .bb-palette-hint { color:var(--bb-night-muted); }

/* v1.0.3: Middernacht and Nachtroos now use LIGHT page surfaces. The picker
 * panel also stays light, so its heading must not inherit the old pale-on-dark
 * text colours. Scope to the two palettes: original six themes unchanged. */
html[data-blush-palette="midnight"] #page-footer .bb-palette-panel {
  background: #fff; color: #263b4d; border-color: #cfe0eb;
}
html[data-blush-palette="nightrose"] #page-footer .bb-palette-panel {
  background: #fff; color: #453545; border-color: #ead7e5;
}
html[data-blush-palette="midnight"] #page-footer .bb-palette-title { color: #174b68; }
html[data-blush-palette="nightrose"] #page-footer .bb-palette-title { color: #6a254b; }
html[data-blush-palette="midnight"] #page-footer .bb-palette-choices button,
html[data-blush-palette="nightrose"] #page-footer .bb-palette-choices button {
  background: #fff; color: #403445; border-color: #e6dbe3;
}
html[data-blush-palette="midnight"] #page-footer .bb-palette-choices button[aria-pressed="true"],
html[data-blush-palette="nightrose"] #page-footer .bb-palette-choices button[aria-pressed="true"] {
  background: #f7f1f6; color: #3d3041;
}
html[data-blush-palette="midnight"] #page-footer .bb-palette-choices button:hover,
html[data-blush-palette="nightrose"] #page-footer .bb-palette-choices button:hover {
  background: #f8f3f7; color: #3d3041;
}
html[data-blush-palette="midnight"] #page-footer .bb-palette-hint { color: #53697a; }
html[data-blush-palette="nightrose"] #page-footer .bb-palette-hint { color: #735d71; }

/* Slightly larger choices in the colour picker, including on touch devices. */
#page-footer .bb-palette-toggle { font-size: 12.75px; }
#page-footer .bb-palette-choices button { font-size: 12.25px; line-height: 1.35; }
#page-footer .bb-palette-hint { font-size: 11.75px; }

/* Three additional light combinations: 12 choices, four rows. */
.bb-swatch-goldblue { background:linear-gradient(120deg,#d0b972 50%,#3a587a 50%); }
.bb-swatch-sage { background:linear-gradient(120deg,#557c6a 50%,#e8d6a8 50%); }
.bb-swatch-bordeaux { background:linear-gradient(120deg,#71364e 50%,#e2c893 50%); }
html[data-blush-palette="goldblue"] { --bb-picker-accent:#3a587a; --bb-picker-dark:#2e4767; --bb-picker-outline:#d5dfe9; --bb-picker-soft:#f4f6fa; --bb-picker-hover:#e8eef5; }
html[data-blush-palette="sage"] { --bb-picker-accent:#456957; --bb-picker-dark:#335847; --bb-picker-outline:#d7e3d8; --bb-picker-soft:#f5f9f3; --bb-picker-hover:#e8f1e8; }
html[data-blush-palette="bordeaux"] { --bb-picker-accent:#783b54; --bb-picker-dark:#663248; --bb-picker-outline:#ebd8dd; --bb-picker-soft:#fdf6f8; --bb-picker-hover:#f9e9ed; }
#page-footer .bb-palette-panel { max-height: min(78vh, 530px); overflow-y: auto; overscroll-behavior: contain; }

/* Optional index placement: default right sidebar (BlushBloom native layout),
   or traditional full-width statistics below the forum list. No DOM rewrites,
   so core index events and third-party statistics remain in original order. */
html[data-blush-stats="bottom"] .bb-index-layout {
  display: block;
  min-width: 0;
}
html[data-blush-stats="bottom"] .bb-index-layout .bb-index-main,
html[data-blush-stats="bottom"] .bb-index-layout .bb-index-side {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
html[data-blush-stats="bottom"] .bb-index-layout .bb-index-side {
  display: block;
  margin-top: 19px;
}
html[data-blush-stats="bottom"] .bb-index-side > .stat-block {
  width: 100%;
  margin: 0 0 14px;
}
html[data-blush-stats="bottom"] .bb-index-side > * { min-width: 0; max-width: 100%; }

/* Translated, keyboard-accessible segmented radio selector in the footer. */
#page-footer .bb-palette-layout {
  min-width: 0;
  margin: 14px 0 0;
  padding: 13px 0 0;
  border: 0;
  border-top: 1px solid var(--bb-picker-outline);
}
#page-footer .bb-palette-layout-title {
  display: block;
  float: none;
  width: 100%;
  padding: 0;
  margin: 0 0 9px;
  color: #59445a;
  font-family: inherit; font-size: 12.5px; font-weight: 700;
  line-height: 1.45;
}
#page-footer .bb-palette-layout-options {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 8px;
}
#page-footer .bb-palette-layout-option {
  position: relative;
  display: block;
  padding: 0;
  margin: 0;
  min-width: 0;
  cursor: pointer;
}
#page-footer .bb-palette-layout-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
#page-footer .bb-palette-layout-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 37px;
  padding: 7px 5px;
  border: 1px solid #e8dae2;
  border-radius: 9px;
  color: #544352;
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
  transition: border-color .14s ease, background-color .14s ease;
}
#page-footer .bb-palette-layout-option .icon { color: inherit; }
#page-footer .bb-palette-layout-option input:checked + span {
  background: var(--bb-picker-soft);
  border: 2px solid var(--bb-picker-accent);
  padding: 6px 4px;
  color: var(--bb-picker-dark);
}
#page-footer .bb-palette-layout-option input:focus-visible + span {
  outline: 3px solid var(--bb-picker-accent);
  outline-offset: 2px;
}
#page-footer .bb-palette-layout-option:hover span {
  background: var(--bb-picker-soft);
  border-color: var(--bb-picker-accent);
}
#page-footer .bb-palette-layout-hint {
  margin: 9px 0 0;
  color: #74616e;
  font-size: 11.5px;
  line-height: 1.45;
}
/* The two dark-named palettes use light popup surfaces since v1.0.3. */
html[data-blush-palette="midnight"] #page-footer .bb-palette-layout-option span,
html[data-blush-palette="nightrose"] #page-footer .bb-palette-layout-option span {
  background: #fff;
  color: #403445;
  border-color: #e6dbe3;
}
html[data-blush-palette="midnight"] #page-footer .bb-palette-layout-option input:checked + span,
html[data-blush-palette="nightrose"] #page-footer .bb-palette-layout-option input:checked + span {
  background: #f7f1f6;
  color: #403445;
  border-color: var(--bb-picker-accent);
}
@media (max-width: 520px) {
  html[data-blush-stats="bottom"] .bb-index-layout .bb-index-side { margin-top: 13px; }
  #page-footer .bb-palette-layout-title { font-size: 12px; }
}
