/* Greetings page (greetings.html) and greeting settings (greeting-settings.html).
   They sit in the site shell (css/sidenav.css: side menu, bottom bar, Gotham), so
   this file only styles their own content, in the site's colours. Everything is
   under gx-/gs- class names so it cannot change other pages. */
.gx-body {
  --gx-brand: #6056a0;
  --gx-brand-dark: #4a4185;
  --gx-ink: #403a5d;
  --gx-muted: #7a7590;
  --gx-line: #ddd9f3;
  --gx-soft: #e8e5fb;
  --gx-tint: #f7f6fd;
  --gx-orange: #f2ad85;
  --gx-orange-dark: #ce8053;
  --gx-wa: #25a35a;
  color: var(--gx-ink);
  background: #fff;
}
.gx-body a { color: var(--gx-brand); }
.gx-body button { color: inherit; }
.gx-body button:focus { outline: none; }
.gx-body button:focus-visible, .gx-body a:focus-visible, .gx-body select:focus-visible { outline: 2px solid var(--gx-brand); outline-offset: 2px; }

/* ----- top bar: page name, language and "your photo" ----- */
.gx-topbar { gap: 12px; }
.gx-topbar .heading { min-width: 0; }
.gx-top-tools { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gx-lang { border: 1px solid var(--gx-line); border-radius: 26px; padding: 6px 12px; font-size: 14px; color: var(--gx-ink); background: #fff; max-width: 160px; cursor: pointer; }
.gx-me { display: flex; align-items: center; gap: 8px; color: var(--gx-ink); text-decoration: none; font-size: 14px; background: #dbe9ff; padding: 4px 14px 4px 4px; border-radius: 26px; max-width: 200px; transition: background .3s; }
.gx-body .gx-me { color: var(--gx-ink); }
.gx-me:hover { background: #c9ddff; text-decoration: none; }
.gx-me span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-me-photo { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; background: #fff center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--gx-brand); font-size: 15px; }

/* ----- category menus (each opens a panel, e.g. Quotes / Messages) ----- */
.gx-scroll { padding-top: 0 !important; }
.gx-menus { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; overflow-x: auto; margin: 0 -1.25rem 12px; padding: 6px 1.25rem; background: #fff; border-bottom: 1px solid var(--gx-line); scrollbar-width: none; }
.gx-menus::-webkit-scrollbar { display: none; }
.gx-menu > button { border: 0; background: none; padding: 9px 14px; white-space: nowrap; cursor: pointer; color: var(--gx-ink); font-size: 15px; border-radius: 30px; transition: background .3s; }
.gx-menu > button:hover, .gx-menu.open > button { background: var(--gx-soft); }
.gx-menu > button[aria-haspopup]::after { content: ""; display: inline-block; margin-left: 6px; border: 5px solid transparent; border-top-color: currentColor; transform: translateY(3px); }
.gx-panel { display: none; position: fixed; transform: translateX(-50%); width: min(720px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--gx-line); border-radius: 14px; box-shadow: 0 14px 40px rgba(64, 58, 93, .18); padding: 18px 22px; gap: 10px 36px; z-index: 30; max-height: 70vh; overflow: auto; }
.gx-menu.open .gx-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gx-panel h3 { margin: 0 0 6px; font-size: 16px; color: var(--gx-brand); }
.gx-panel a { display: block; padding: 7px 10px; margin: 0 -10px; text-decoration: none; color: var(--gx-ink); font-size: 15px; border-radius: 20px; }
.gx-panel a:hover { background: var(--gx-soft); color: var(--gx-ink); text-decoration: none; }

/* ----- chips, heading, sort ----- */
.gx-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.gx-chips::-webkit-scrollbar { display: none; }
.gx-chip { flex: 0 0 auto; border: 1px solid var(--gx-line); background: #fff; color: var(--gx-ink); padding: 7px 16px; border-radius: 30px; cursor: pointer; font-size: 14px; transition: background .3s; }
.gx-chip:hover { background: var(--gx-soft); }
.gx-chip.active { background: var(--gx-brand); border-color: var(--gx-brand); color: #fff; }
.gx-chip.today::before { content: "★ "; color: #f5a400; }
.gx-chip.active.today::before { color: #ffd54f; }
.gx-h1 { font-size: clamp(20px, 3vw, 26px); font-weight: 500; color: var(--gx-ink); margin: 10px 0 6px; line-height: 1.25; }
.gx-sort { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 1px solid var(--gx-line); }
.gx-sort button { border: 0; background: none; padding: 8px 2px; margin: 0 14px -1px 0; color: var(--gx-muted); cursor: pointer; border-bottom: 2px solid transparent; font-size: 15px; }
.gx-sort button.active { color: var(--gx-brand); border-color: var(--gx-brand); }

/* ----- festival "today" row ----- */
.gx-today { margin: 4px 0 12px; padding: 14px; border-radius: 15px; background: linear-gradient(92deg, #e8f1ff 0%, #ffe9dc 100%); }
.gx-today h2 { font-size: 18px; font-weight: 500; margin: 0 0 10px; color: var(--gx-ink); }
.gx-rail { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.gx-rail button { flex: 0 0 132px; border: 0; padding: 0; background: none; cursor: pointer; scroll-snap-align: start; text-align: left; }
.gx-rail img { width: 132px; height: 165px; object-fit: cover; border-radius: 10px; display: block; background: var(--gx-soft); }
.gx-rail span { display: block; font-size: 13px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gx-ink); }

/* ----- feed cards (like the drawing cards) ----- */
.gx-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.gx-card { background: #fff; border: 1px solid var(--gx-line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.gx-frame { position: relative; background: var(--gx-tint); cursor: pointer; container-type: inline-size; }
.gx-frame img.bg { display: block; width: 100%; height: auto; }
.gx-ov-photo { position: absolute; border-radius: 50%; transform: translate(-50%, -50%); background: #fff center / cover no-repeat; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); border: 3px solid #fff; }
.gx-ov-photo.empty { background: rgba(96, 86, 160, .88); border: 3px dashed #fff; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 13px; text-align: center; line-height: 1.1; }
.gx-ov-photo.empty::before { content: "+"; font-size: 1.8em; line-height: 1; }
.gx-ov-name { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-weight: 700; line-height: 1; padding: .35em .6em; border-radius: 999px; max-width: 92%; overflow: hidden; text-overflow: ellipsis; }
.gx-ov-name.pill { background: rgba(0, 0, 0, .45); }
.gx-ov-name:not(.pill) { text-shadow: 0 1px 4px rgba(0, 0, 0, .7); }
.gx-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.gx-card-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--gx-muted); }
.gx-card-actions { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr; gap: 8px; }

/* ----- buttons (the site's rounded buttons) ----- */
.gx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--gx-brand); color: #fff !important; padding: 9px 12px; border-radius: 26px; cursor: pointer; text-decoration: none; font-size: 14px; line-height: 1.2; transition: background .3s; }
.gx-btn:hover { background: var(--gx-brand-dark); text-decoration: none; }
.gx-btn:disabled { opacity: .55; cursor: default; }
.gx-wa { background: var(--gx-wa); }
.gx-wa:hover { background: #1c8a4a; }
.gx-dark { background: var(--gx-orange); }
.gx-dark:hover { background: var(--gx-orange-dark); }
.gx-ghost { background: var(--gx-soft); color: var(--gx-ink) !important; }
.gx-ghost:hover { background: #d9d4f6; }
.gx-change { border: 1px solid var(--gx-line); background: #fff; color: var(--gx-brand); border-radius: 26px; padding: 8px; cursor: pointer; font-size: 14px; transition: background .3s; }
.gx-change:hover { background: var(--gx-soft); }
.gx-link { border: 0; background: none; color: var(--gx-brand) !important; cursor: pointer; text-decoration: underline; padding: 0; font-size: 14px; }
.gx-more { text-align: center; padding: 22px; color: var(--gx-muted); }
.gx-empty { grid-column: 1 / -1; text-align: center; color: var(--gx-muted); padding: 40px 10px; }
.gx-skel { border-radius: 10px; background: linear-gradient(100deg, #eeebfb 40%, #f8f7fe 50%, #eeebfb 60%) 0 0 / 200% 100%; animation: gx-sh 1.2s linear infinite; aspect-ratio: 4 / 5.6; }
@keyframes gx-sh { to { background-position: -200% 0; } }
.gx-foot { text-align: center; color: var(--gx-muted); font-size: 14px; padding: 24px 0 8px; }
.gx-foot p { margin: 0; }

/* ----- card editor ----- */
.gx-studio { margin: auto; border: 0; padding: 0; border-radius: 15px; width: min(1000px, 96vw); max-height: 96vh; color: var(--gx-ink); }
.gx-studio::backdrop { background: rgba(32, 28, 56, .6); }
.gx-studio-in { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px; }
@media (min-width: 820px) { .gx-studio-in { grid-template-columns: minmax(0, 1fr) 320px; } }
.gx-canvas-wrap { display: flex; flex-direction: column; align-items: center; }
#canvas { max-width: 100%; max-height: 72vh; border-radius: 10px; touch-action: none; cursor: grab; box-shadow: 0 4px 18px rgba(64, 58, 93, .18); }
.gx-tools { position: relative; display: flex; flex-direction: column; gap: 12px; }
.gx-tools h2 { margin: 0; font-size: 20px; font-weight: 500; }
.gx-tools label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--gx-muted); margin: 0; }
.gx-tools label.gx-check { flex-direction: row; align-items: center; gap: 8px; color: var(--gx-ink); }
.gx-tools label.gx-btn { flex-direction: row; font-size: 14px; }
.gx-tools [hidden] { display: none !important; }
.gx-tools input:not([type=checkbox]):not([type=range]), .gs-card input, .gs-card select { font-size: 15px; padding: 9px 12px; border: 1px solid var(--gx-line); border-radius: 10px; color: var(--gx-ink); background: #fff; }
.gx-tools input[type=range] { accent-color: var(--gx-brand); }
.gx-photo-row { display: flex; align-items: center; gap: 10px; }
.gx-photo-prev { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; background: var(--gx-soft) center / cover no-repeat; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--gx-line); }
.gx-swatches { display: flex; gap: 8px; }
.gx-swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #c9c2da; cursor: pointer; }
.gx-swatches button[aria-checked=true] { box-shadow: 0 0 0 3px var(--gx-brand); }
.gx-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gx-x { position: absolute; right: 0; top: -6px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--gx-muted) !important; }
.gx-hint { color: var(--gx-muted); font-size: 13px; margin: 6px 0 0; }
.gx-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--gx-ink); color: #fff; padding: 10px 16px; border-radius: 26px; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 11112; max-width: 90vw; font-size: 14px; }
.gx-toast.show { opacity: 1; }

/* ----- greeting settings page ----- */
.gs-card { max-width: 560px; margin: 4px auto 24px; background: #fff; border: 1px solid var(--gx-line); border-radius: 15px; padding: 22px; }
.gs-card h1 { margin: 0 0 4px; font-size: 22px; font-weight: 500; color: var(--gx-ink); }
.gs-card form { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.gs-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--gx-muted); margin: 0; }
.gs-photo { display: flex; align-items: center; gap: 16px; }
.gs-photo .gx-photo-prev { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; color: var(--gx-brand); font-size: 34px; }
.gs-photo .gx-btn { flex-direction: row; }
.gs-note { background: #fff4ec; border: 1px solid #fbd9c4; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 10px 0 0; }
.gs-preview { margin-top: 18px; }
.gs-preview .gx-frame { border-radius: 10px; overflow: hidden; max-width: 320px; }
.gs-back { display: inline-block; margin-bottom: 12px; font-size: 14px; }

/* ----- phones: the bottom bar covers the foot of the page ----- */
@media (max-width: 767px) {
  .gx-scroll { padding-bottom: 80px !important; }
  .gx-lang { max-width: 136px; padding: 5px 6px; font-size: 13px; }
  .gx-me { padding: 3px; }
  .gx-me span:last-child { display: none; }
  .gx-toast { bottom: 70px; }
}
@media (max-width: 560px) {
  .gx-feed { grid-template-columns: 1fr; gap: 16px; }
  .gx-menus { margin: 0 -1.25rem 10px; }
}
