/* Celebration (Figma "Celebration" 22316:124719) — js/screens/celebration.js. Prefix cel-.
   Reuses .n-tabs / .n-tab (Staff / Students), .sl-back, .stl-star, .rs-search (header search), .an-next, ui.sheet. */

.screen.cel { display: flex; flex-direction: column; overflow: hidden; background: var(--goku); }
.cel-top { flex: none; display: flex; flex-direction: column; gap: 4px; padding-top: calc(var(--sb-dash) + 24px); }
.cel-head { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px; }
.cel-head h1 { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cel-icon { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; }
.cel-icon:hover { background: var(--heles); }
.cel-search { flex: 1; min-width: 0; }
.cel-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-bottom: 24px; }
.cel-scroll::-webkit-scrollbar { display: none; }

/* All / Birthday / Anniversary switcher (22316:124735) */
.cel-switch { position: sticky; top: 0; z-index: 2; display: flex; gap: 8px; padding: 24px 20px 12px; background: var(--goku); }
.cel-switch[hidden] { display: none; }
.cel-sw {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 12px; border-radius: 8px; background: var(--gohan);
  font: 700 14px/24px var(--font); color: var(--trunks); white-space: nowrap;
}
.cel-sw:first-child { padding: 0 12px; }
.cel-sw.is-on { background: var(--piccolo); color: var(--gohan); }
.cel-sw:not(.is-on):hover { background: #FAFAFA; }

.cel-groups { display: flex; flex-direction: column; gap: 8px; padding: 0 20px; }
.cel-switch[hidden] + .cel-groups { padding-top: 24px; } /* Students tab: no filter row above the list */
.cel-group { display: flex; flex-direction: column; gap: 8px; }
.cel-group + .cel-group { margin-top: 8px; }
.cel-group-head { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.cel-group-head h2 { flex: 1; min-width: 0; font: 700 18px/28px var(--font); color: var(--bulma); }
.cel-multi {
  flex: none; display: flex; align-items: center; gap: 4px; padding: 4px 12px 4px 4px; border-radius: 8px; background: var(--piccolo);
  font: 400 14px/24px var(--font); color: var(--goten);
}
.cel-multi:hover { filter: brightness(1.08); }
.cel-list { display: flex; flex-direction: column; gap: 4px; }

/* Person card */
.cel-card { width: 100%; display: flex; flex-direction: column; gap: 12px; padding: 12px 16px; border-radius: 8px; background: var(--gohan); text-align: left; }
button.cel-card:hover { background: #FCFCFC; }
.cel-person { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.cel-av { flex: none; display: flex; flex-direction: column; align-items: center; width: 48px; }
.cel-av img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; margin-bottom: -4px; }
.cel-badge {
  position: relative; min-width: 48px; padding: 0 8px; border-radius: 8px; background: #FF4E64;
  font: 700 10px/16px var(--font); letter-spacing: 0.5px; text-transform: uppercase; color: var(--gohan); text-align: center; white-space: nowrap;
}
.cel-badge.is-anniv { background: #FFB319; }
.cel-person-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cel-person-top { display: flex; align-items: center; gap: 10px; }
.cel-name { flex: 1; min-width: 0; font: 400 16px/24px var(--font); color: #0C1322; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cel-when { flex: none; font: 400 12px/16px var(--font); color: var(--trunks); white-space: nowrap; }
.cel-sub { font: 400 12px/16px var(--font); color: var(--trunks); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cel-history .cel-name, .cel-to-one .cel-name { font-weight: 700; }
.cel-history .cel-when, .cel-history .cel-sub, .cel-to-one .cel-sub { font: 400 11px/normal var(--font); color: #5D626C; }
.cel-history .cel-person { gap: 12px; }

.cel-card-row { display: flex; align-items: stretch; gap: 4px; }
.cel-msg {
  flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; padding: 4px 12px; border-radius: 8px; text-align: left;
  font: 400 14px/24px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cel-msg.is-sent { border: 1px solid var(--beerus); color: var(--trunks); }
.cel-msg.is-hist { border: 0; background: var(--heles); }
.cel-msg.is-empty { background: var(--heles); color: rgba(0, 0, 0, 0.25); cursor: text; }
.cel-msg.is-input { border: 1px solid var(--piccolo); outline: 0; background: var(--gohan); color: var(--bulma); }
.cel-msg.is-input::placeholder { color: rgba(0, 0, 0, 0.25); }
.cel-wish { flex: none; width: 82px; padding: 4px 8px; border-radius: 8px; background: var(--jiren); font: 700 14px/24px var(--font); color: var(--piccolo); }
.cel-wish:hover { background: rgba(78, 70, 180, 0.2); }
.cel-wished {
  flex: none; display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px;
  background: rgba(46, 125, 50, 0.12); font: 400 12px/16px var(--font); color: #2E7D32;
}

/* Select mode (127244 / 125158) */
.cel-check { flex: none; position: relative; width: 24px; height: 24px; display: grid; place-items: center; }
.cel-check::before { content: ''; position: absolute; inset: 4px; border: 1.5px solid var(--trunks); border-radius: 4px; }
.cel-check.is-on::before { border: 0; background: var(--piccolo); }
.cel-check img { position: relative; }
.cel-sel-head { position: sticky; top: 0; z-index: 1; padding: 4px 0; background: var(--goku); }
.cel-gcheck { flex: none; display: flex; border-radius: 6px; }
.cel-pick { flex-direction: row; align-items: center; gap: 8px; border: 1px solid transparent; }
.cel-pick.is-on { border-color: var(--piccolo); background: linear-gradient(var(--jiren), var(--jiren)), var(--gohan); }
.cel-select .cel-scroll { padding-top: 16px; }

.cel-bar { flex: none; background: var(--gohan); box-shadow: inset 0 1px 0 #EAEAEA; }
.cel-bar[hidden] { display: none; }
.cel-bar-row { display: flex; align-items: center; gap: 8px; padding: 16px 20px 4px; }
.cel-bar-names {
  flex: 1; min-width: 0; font: 400 14px/20px var(--font); color: var(--bulma); white-space: nowrap; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent); mask-image: linear-gradient(90deg, #000 80%, transparent);
}
.cel-send { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--piccolo); display: grid; place-items: center; }
.cel-send:hover { filter: brightness(1.08); }
.cel-bar .home-indicator { height: 34px; }

/* Wish sheet (126933) */
.sheet.cel-sheet { gap: 0; padding-bottom: 0; }
.cel-wish-body { display: flex; flex-direction: column; gap: 24px; padding: 24px 0; }
.cel-cake { display: flex; justify-content: center; }
.cel-to { display: flex; align-items: flex-start; gap: 4px; flex-wrap: wrap; }
.cel-to-label { flex: none; padding-top: 4px; font: 400 12px/16px var(--font); color: #5D626C; }
.cel-to-names { flex: 1; min-width: 0; font: 700 16px/24px var(--font); color: var(--trunks); }
.cel-to:not(.is-open) .cel-to-names { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70%; }
.cel-to-more { flex: 1; padding-top: 4px; font: 400 12px/16px var(--font); color: #5D626C; white-space: nowrap; }
.cel-to-btn { flex: none; margin-left: auto; display: flex; padding: 2px; border-radius: 9999px; background: var(--goku); }
.cel-to.is-open .cel-to-btn img { transform: rotate(45deg); }
.cel-to-one { display: flex; }
.cel-form { display: flex; flex-direction: column; gap: 12px; }
.cel-wish-input {
  width: 100%; padding: 16px; border: 1px solid var(--goku); border-radius: 8px; outline: 0; background: var(--goku);
  font: 400 16px/24px var(--font); color: var(--bulma);
}
.cel-wish-input::placeholder { color: var(--trunks); }
.cel-wish-input:focus { border-color: var(--piccolo); background: var(--gohan); }
.cel-quick { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.cel-quick::-webkit-scrollbar { display: none; }
.cel-q {
  flex: none; height: 32px; padding: 4px 8px; border: 1px solid var(--beerus); border-radius: 9999px;
  font: 700 14px/24px var(--font); color: var(--trunks); white-space: nowrap;
}
.cel-q:hover { border-color: #CFCFCF; }
.cel-q.is-on { border-color: var(--piccolo); color: var(--piccolo); }
.cel-sheet-foot {
  position: sticky; bottom: 0; margin: 0 -20px; padding: 12px 20px; background: var(--gohan);
  border-top: 1px solid var(--beerus); filter: drop-shadow(0 -2px 8px rgba(0, 0, 0, 0.08));
}

/* Person → full Staff / Student profile (tap avatar + name). Recent cards carry their own small Wish button. */
.cel-person.is-link { cursor: pointer; border-radius: 8px; }
.cel-person.is-link:focus-visible { outline: 2px solid var(--piccolo); outline-offset: 2px; }
.cel-card.is-row:not(.cel-pick) { flex-direction: row; align-items: center; gap: 12px; }
.cel-wish.sm { width: auto; padding: 4px 12px; }
/* Recent cards: avatar opens the profile, the rest of the card opens the wish sheet. */
.cel-card.is-tap { cursor: pointer; }
.cel-card.is-tap:hover { background: #FCFCFC; }
.cel-card.is-tap:focus-visible { outline: 2px solid var(--piccolo); outline-offset: 2px; }
.cel-av-link { flex: none; display: inline-flex; border-radius: 50%; }
.cel-av-link:focus-visible { outline: 2px solid var(--piccolo); outline-offset: 2px; }
span.cel-wish { display: inline-flex; align-items: center; justify-content: center; }
