/* Guestlens base styles: layout helpers for custom pages, loaded in every theme.
   Filament ships a prebuilt stylesheet and there is no Tailwind build step here, so utility
   classes such as mt-4 or grid gap-6 are NOT available. Use these gl- classes instead. */

/* Passkeys section from the passkey plugin (uses mt-4 / space-x-2 / mt-6) */
.fi-section.mt-4, .fi-section.mt-0 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
#passkeyForm { display: flex; align-items: flex-start; gap: .75rem; }
#passkeyForm .fi-fo-field { flex: 1 1 auto; min-width: 0; }
.fi-section-content .mt-6 { margin-top: 1.5rem; }
.fi-section-content .mt-2 { margin-top: .5rem; }
.fi-section-content ul.space-y-4 > * + * { margin-top: 1rem; }

.gl-stack { display: grid; gap: 1.5rem; }
.gl-grid-2 { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .gl-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gl-lead { font-size: .9rem; color: rgb(107 114 128); max-width: 60rem; }
.gl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.gl-step { display: flex; align-items: flex-start; gap: .85rem; }
.gl-step-num { flex: none; width: 1.75rem; height: 1.75rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; background: rgba(245, 100, 118, .14); color: #e43f6f; }
.gl-step-body { flex: 1 1 auto; min-width: 0; }
.gl-step-title { font-weight: 600; font-size: .95rem; }
.gl-step-hint { font-size: .85rem; color: rgb(107 114 128); margin-top: .1rem; }
.gl-step-action { flex: none; font-size: .85rem; }
.gl-dl { display: grid; gap: .6rem; margin: 0; font-size: .875rem; }
.gl-dl dt { font-weight: 600; display: inline; }
.gl-dl dd { display: inline; margin: 0; color: rgb(107 114 128); }
.gl-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; font-size: .9rem; }
.gl-row + .gl-row { border-top: 1px solid rgba(107, 114, 128, .15); }
.gl-muted { color: rgb(107 114 128); font-size: .9rem; }

/* Support banner */
.gl-support { background: #991b1b; color: #fff; padding: .5rem 1rem; display: flex; gap: 1rem; align-items: center; justify-content: space-between; font-size: .85rem; }
.gl-support button { background: #fff; color: #991b1b; border-radius: 999px; padding: .2rem .9rem; font-weight: 600; cursor: pointer; }

/* Utility shim: only the Tailwind classes our custom views use (Filament's prebuilt CSS omits them). */
.fi-page .space-y-2 > * + * { margin-top: .5rem; }
.fi-page .space-y-3 > * + *, .fi-modal .space-y-3 > * + * { margin-top: .75rem; }
.fi-page .space-y-6 > * + * { margin-top: 1.5rem; }
.fi-page .grid { display: grid; }
.fi-page .gap-2 { gap: .5rem; }
.fi-page .gap-6 { gap: 1.5rem; }
@media (min-width: 768px) { .fi-page .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fi-page .flex, .fi-modal .flex { display: flex; }
.fi-page .flex-wrap { flex-wrap: wrap; }
.fi-page .block, .fi-modal .block { display: block; }
.fi-page .w-full, .fi-modal .w-full { width: 100%; }
.fi-page .w-32 { width: 8rem; }
.fi-page .text-left { text-align: left; }
.fi-page .text-sm, .fi-modal .text-sm { font-size: .875rem; line-height: 1.25rem; }
.fi-page .text-xs { font-size: .75rem; line-height: 1rem; }
.fi-page .font-semibold, .fi-modal .font-semibold { font-weight: 600; }
.fi-page .p-1 { padding: .25rem; }
.fi-page .p-2 { padding: .5rem; }
.fi-page .p-3, .fi-modal .p-3 { padding: .75rem; }
.fi-page .pt-2 { padding-top: .5rem; }
.fi-page .pt-4 { padding-top: 1rem; }
.fi-page .mb-4 { margin-bottom: 1rem; }
.fi-page .rounded, .fi-modal .rounded { border-radius: .5rem; }
.fi-page .border, .fi-modal .border { border: 1px solid rgba(107, 114, 128, .3); }
.fi-page .border-primary-500 { border-color: var(--primary-500, #f56476); }
.fi-page .underline, .fi-modal .underline { text-decoration: underline; }
.fi-page .text-gray-500 { color: rgb(107 114 128); }
.fi-page .text-warning-600 { color: #d97706; }
.fi-page .object-contain { object-fit: contain; }
.fi-page .max-h-\[60vh\] { max-height: 60vh; }
.fi-page .whitespace-pre-wrap, .fi-modal .whitespace-pre-wrap { white-space: pre-wrap; }
.fi-page table { border-collapse: collapse; }
.fi-page table tr + tr { border-top: 1px solid rgba(107, 114, 128, .15); }
.fi-page .fi-fo-field input[type=text], .fi-page input.rounded, .fi-page textarea.rounded { background: transparent; }

/* Moderation queue: one photo at a time, photo first, few calm controls. */
.gl-mod { display: grid; gap: 1rem; }
.gl-mod-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.gl-pill { display: inline-flex; align-items: center; padding: .25rem .75rem; border-radius: 999px; font-size: .85rem; font-weight: 600; background: rgba(245, 100, 118, .14); color: #e43f6f; }
.gl-mod-keys kbd { font-family: inherit; font-size: .75rem; padding: .05rem .4rem; border: 1px solid rgba(107, 114, 128, .35); border-radius: .3rem; }
.gl-mod-layout { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) { .gl-mod-layout { grid-template-columns: minmax(0, 1fr) 20rem; } }
.gl-mod-frame { background: #111827; border-radius: .9rem; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 16rem; }
.gl-mod-frame img { display: block; max-width: 100%; max-height: 68vh; width: auto; height: auto; object-fit: contain; }
.gl-mod-side { display: grid; gap: 1.1rem; padding: 1.25rem; border-radius: .9rem; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); border: 1px solid rgba(107, 114, 128, .15); }
.dark .gl-mod-side { background: rgba(255, 255, 255, .04); }
.gl-mod-caption { font-size: 1.1rem; font-weight: 600; line-height: 1.35; }
.gl-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.gl-chip { display: inline-flex; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; background: rgba(107, 114, 128, .12); color: rgb(75 85 99); }
.dark .gl-chip { color: rgb(209 213 219); }
.gl-chip-warn { background: rgba(245, 158, 11, .18); color: #92400e; }
.dark .gl-chip-warn { color: #fbbf24; }
.gl-mod-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.gl-mod-reject { display: grid; gap: .75rem; }
.gl-mod-reject-title { font-weight: 600; font-size: .9rem; }
.gl-mod-empty { display: grid; justify-items: center; gap: .4rem; text-align: center; padding: 4rem 1rem; }
.gl-mod-empty-icon { width: 3rem; height: 3rem; color: #10b981; }

/* Results page: stage tracker, top three, ranked list, the maths on request. */
.gl-res { display: grid; gap: 1.25rem; }
.gl-res-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.gl-res-stages { display: flex; gap: .35rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.gl-res-stages li { padding: .25rem .75rem; border-radius: 999px; font-size: .8rem; background: rgba(107, 114, 128, .12); color: rgb(107 114 128); }
.gl-res-stages li.is-done { background: rgba(16, 185, 129, .14); color: #047857; }
.gl-res-stages li.is-current { background: rgba(245, 100, 118, .16); color: #e43f6f; font-weight: 600; }
.gl-res-warn { display: flex; gap: .6rem; padding: .85rem 1rem; border-radius: .75rem; background: rgba(245, 158, 11, .12); color: #92400e; font-size: .875rem; }
.dark .gl-res-warn { color: #fbbf24; }
.gl-res-warn-icon { width: 1.25rem; height: 1.25rem; flex: none; }
.gl-res-empty-icon { color: rgb(156 163 175); }
.gl-res-podium { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .gl-res-podium { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gl-res-card { border-radius: .9rem; overflow: hidden; background: #fff; border: 1px solid rgba(107, 114, 128, .15); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.dark .gl-res-card { background: rgba(255, 255, 255, .04); }
.gl-res-card.is-first { border-color: #f5b301; box-shadow: 0 0 0 2px rgba(245, 179, 1, .35); }
.gl-res-thumb { aspect-ratio: 3 / 2; background: #111827; }
.gl-res-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gl-res-card-body { padding: 1rem; display: grid; gap: .3rem; }
.gl-res-rank { font-size: .8rem; font-weight: 700; color: #e43f6f; }
.gl-res-card.is-first .gl-res-rank { color: #b45309; }
.gl-res-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-res-final { font-size: 1.75rem; font-weight: 700; line-height: 1.1; margin: .25rem 0; }
.gl-res-final span { font-size: .85rem; font-weight: 400; color: rgb(107 114 128); }
.gl-res-bars { display: grid; gap: .3rem; }
.gl-res-bar { display: grid; grid-template-columns: 3.5rem 1fr 2.75rem; align-items: center; gap: .5rem; font-size: .75rem; color: rgb(107 114 128); }
.gl-res-bar i { display: block; height: .4rem; border-radius: 999px; background: rgba(107, 114, 128, .15); overflow: hidden; }
.gl-res-bar b { display: block; height: 100%; border-radius: 999px; background: #6366f1; }
.gl-res-bar.is-public b { background: #e43f6f; }
.gl-res-bar em { font-style: normal; text-align: right; }
.gl-res-list { border-radius: .9rem; background: #fff; border: 1px solid rgba(107, 114, 128, .15); }
.dark .gl-res-list { background: rgba(255, 255, 255, .04); }
.gl-res-list:empty { display: none; }
.gl-res-row { display: grid; grid-template-columns: 2.5rem 3.25rem minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: .7rem 1rem; }
.gl-res-row + .gl-res-row { border-top: 1px solid rgba(107, 114, 128, .12); }
.gl-res-row-rank { font-weight: 700; color: rgb(107 114 128); }
.gl-res-row-thumb { width: 3.25rem; height: 3.25rem; border-radius: .5rem; object-fit: cover; background: #111827; }
.gl-res-row-bars { display: none; width: 14rem; }
@media (min-width: 768px) { .gl-res-row { grid-template-columns: 2.5rem 3.25rem minmax(0, 1fr) 14rem 3.5rem; } .gl-res-row-bars { display: block; } }
.gl-res-row-final { font-weight: 700; text-align: right; }
.gl-res-maths summary { cursor: pointer; font-size: .875rem; font-weight: 600; color: #e43f6f; }
.gl-res-maths p { margin: .75rem 0; }
.gl-res-maths table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.gl-res-maths th, .gl-res-maths td { text-align: left; padding: .45rem .5rem; border-top: 1px solid rgba(107, 114, 128, .15); }
.gl-res-maths th { font-weight: 600; color: rgb(107 114 128); border-top: 0; }
.gl-res-maths details, .gl-res-maths { overflow-x: auto; }

/* Dashboard: campaign card, four tiles, next steps. */
.gl-dash { display: grid; gap: 1.25rem; }
.gl-dash-hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem; padding: 1.5rem; border-radius: 1rem;
    background: linear-gradient(135deg, rgba(245, 100, 118, .12), rgba(99, 102, 241, .10)); border: 1px solid rgba(107, 114, 128, .12); }
.gl-dash-hero-main { display: grid; gap: .45rem; min-width: 0; }
.gl-dash-label { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: rgb(107 114 128); }
.gl-dash-title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.gl-dash-next { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; }
.gl-dash-next-icon { width: 1.1rem; height: 1.1rem; color: #e43f6f; }
.gl-dash-stages { margin-top: .35rem; }
.gl-dash-hero-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.gl-dash-tiles { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .gl-dash-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gl-dash-tile { display: grid; gap: .15rem; align-content: start; padding: 1.1rem 1.2rem; border-radius: .9rem; background: #fff; border: 1px solid rgba(107, 114, 128, .15);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05); text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
a.gl-dash-tile:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }
.dark .gl-dash-tile { background: rgba(255, 255, 255, .04); }
.gl-dash-tile-icon { width: 2.25rem; height: 2.25rem; border-radius: .65rem; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .5rem; }
.gl-dash-tile-icon svg { width: 1.2rem; height: 1.2rem; }
.gl-dash-tile-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; }
.gl-dash-tile-label { font-weight: 600; font-size: .9rem; }
.gl-dash-tile-hint { font-size: .8rem; color: rgb(107 114 128); }
.tone-blue .gl-dash-tile-icon { background: rgba(59, 130, 246, .12); color: #2563eb; }
.tone-green .gl-dash-tile-icon { background: rgba(16, 185, 129, .12); color: #059669; }
.tone-amber .gl-dash-tile-icon { background: rgba(245, 158, 11, .16); color: #b45309; }
.tone-amber .gl-dash-tile-hint { color: #b45309; }
.tone-pink .gl-dash-tile-icon { background: rgba(245, 100, 118, .14); color: #e43f6f; }
.tone-gray .gl-dash-tile-icon { background: rgba(107, 114, 128, .12); color: rgb(107 114 128); }
.gl-dash-steps { border-radius: 1rem; background: #fff; border: 1px solid rgba(107, 114, 128, .15); overflow: hidden; }
.dark .gl-dash-steps { background: rgba(255, 255, 255, .04); }
.gl-dash-steps-head { display: flex; align-items: center; gap: .5rem; padding: .9rem 1.2rem; font-weight: 600; border-bottom: 1px solid rgba(107, 114, 128, .12); }
.gl-dash-step { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.2rem; font-size: .9rem; color: inherit; text-decoration: none; }
.gl-dash-step + .gl-dash-step { border-top: 1px solid rgba(107, 114, 128, .1); }
a.gl-dash-step:hover { background: rgba(245, 100, 118, .05); }
.gl-dash-step-dot { width: .55rem; height: .55rem; border-radius: 999px; background: #e43f6f; flex: none; }
.gl-dash-step-text { flex: 1 1 auto; }
.gl-dash-step-go { width: 1.1rem; height: 1.1rem; color: rgb(156 163 175); }
.gl-dash-step-ok { width: 1.25rem; height: 1.25rem; color: #10b981; flex: none; }

/* Guests: the "Photos" slide-over lists one guest's photos. */
.gl-guest-photos { display: grid; gap: .75rem; }
.gl-guest-photo { display: flex; gap: .85rem; align-items: center; }
.gl-guest-photo-thumb { width: 5.5rem; height: 4rem; flex: none; border-radius: .5rem; object-fit: cover; background: rgba(107, 114, 128, .12); }
.gl-guest-photo-caption { font-weight: 600; }
