/* Group Time Finder (w033) */
.gtf, .gtf > *, .gtf .kit-card > *, .gtf-panel > * { min-width: 0; }
.gtf { display: grid; gap: 1.25rem; }
.gtf-label { color: var(--muted); font-weight: 600; }
body.gtf-in-poll .kit-lead { display: none; }
.gtf-go { min-height: 52px; padding-inline: 1.5rem; font-size: 1.05rem; }

/* calendar */
.gtf-cal-block { display: grid; gap: .5rem; }
.gtf-cal-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; }
.gtf-count { color: var(--accent); font-weight: 700; }
.gtf-count[data-kind="error"] { color: var(--danger); }
.gtf-cal-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; }
.gtf-month { margin: 0; text-align: center; font-weight: 700; font-size: 1.1rem; }
.gtf-cal { display: grid; grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 2px; max-width: 30rem; }
.gtf-wd { padding: .2rem 0; text-align: center; color: var(--muted); font-size: .8rem; font-weight: 700; }
.gtf-day-btn { min-width: 44px; min-height: 44px; padding: 0; border-radius: .5rem; border-color: transparent; background: transparent; font-variant-numeric: tabular-nums; }
.gtf-day-btn:hover:not(:disabled) { background: var(--card); }
.gtf-day-btn.gtf-today { border-color: #5b6b8a; }
.gtf-day-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gtf-day-btn:disabled { background: transparent; opacity: .35; }

/* poll header and share box */
.gtf-poll-head { display: grid; gap: .25rem; }
.gtf-poll-title { margin: 0; font-size: clamp(1.4rem, 5vw, 2rem); overflow-wrap: anywhere; }
.gtf-poll-title:focus { outline: none; }
.gtf-share { display: grid; gap: .5rem; padding: 1rem; border: 1px solid #3c5a52; border-radius: .85rem; background: #13231f; }
.gtf-share input { font-size: .95rem; }
.gtf-inline { display: flex; margin-top: .5rem; }

/* tabs */
.gtf-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .3rem; border-radius: .85rem; background: #0c1220; }
.gtf-tabs button { border: 0; background: transparent; color: var(--muted); }
.gtf-tabs button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: inset 0 -3px 0 var(--accent); }
.gtf-pill { display: inline-block; margin-inline-start: .35rem; padding: .05rem .5rem; border-radius: 999px; background: #24304a; color: var(--text); font-size: .8rem; font-weight: 700; }
.gtf-panel { display: grid; gap: 1rem; }

/* my availability */
.gtf-legend { margin: 0; padding: .6rem .85rem; border-radius: .65rem; background: #0c1220; color: var(--muted); }
.gtf-days { display: grid; gap: .85rem; }
.gtf-day { display: grid; gap: .6rem; padding: .85rem; border: 1px solid var(--border); border-radius: .85rem; background: #0c1220; }
.gtf-day-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem; }
.gtf-day-head h3 { margin: 0; font-size: 1.05rem; }
.gtf-day-tools { display: flex; flex-wrap: wrap; gap: .35rem; }
.gtf-tool { min-height: 44px; padding: .3rem .7rem; font-size: .9rem; font-weight: 600; }
.gtf-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.1rem, 1fr)); gap: .4rem; }
.gtf-slots-days { grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); }
.gtf-slot { display: flex; align-items: center; justify-content: center; gap: .35rem; min-height: 48px; padding: .3rem .4rem; font-variant-numeric: tabular-nums; touch-action: manipulation; white-space: nowrap; }
.gtf-mark { display: inline-block; min-width: .9em; font-weight: 900; }
.gtf-slot[data-state="2"] { background: #1e6b4e; border-color: #3fbf8c; color: #fff; }
.gtf-slot[data-state="1"] { background: #5e4b14; border-color: #e0b13c; color: #fff; border-style: dashed; }
.gtf-save-bar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem 1rem; padding: .75rem 0; background: linear-gradient(to top, var(--panel) 75%, transparent); }
.gtf-dirty { color: #ffd36e; font-weight: 700; }
.gtf-mine-tools { display: grid; gap: .5rem; }

/* best times */
.gtf-empty { margin: 0; padding: 1rem; border: 1px dashed var(--border); border-radius: .85rem; color: var(--muted); }
#best-body { display: grid; gap: 1rem; }
#best-body > * { min-width: 0; }
.gtf-filters { display: grid; gap: .75rem; }
.gtf-required { margin: 0; padding: 0; border: 0; display: grid; gap: .35rem; }
.gtf-required legend { color: var(--muted); font-weight: 600; margin-bottom: .2rem; }
.gtf-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.gtf-chip { padding: 0 .85rem; border: 1px solid #41506b; border-radius: 999px; background: var(--card); overflow-wrap: anywhere; }
.gtf-chip:has(input:checked) { border-color: var(--accent); }
#min-wrap { max-width: 16rem; }
.gtf-best { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; counter-reset: option; }
.gtf-option { position: relative; display: grid; gap: .15rem; padding: .85rem 1rem .85rem 3rem; border: 1px solid var(--border); border-radius: .85rem; background: #0c1220; counter-increment: option; }
[dir="rtl"] .gtf-option { padding: .85rem 3rem .85rem 1rem; }
.gtf-option::before { content: counter(option); position: absolute; inset-inline-start: .85rem; top: .9rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--card); font-weight: 800; }
.gtf-option:first-child { border-color: var(--accent); background: #13231f; }
.gtf-option:first-child::before { background: var(--accent); color: var(--accent-ink); }
.gtf-option p { margin: 0; overflow-wrap: anywhere; }
.gtf-when { font-weight: 800; font-size: 1.1rem; }
.gtf-can { color: var(--ok); font-weight: 700; }
.gtf-names { color: var(--muted); font-size: .95rem; }
.gtf-maybe-names { color: #ffd36e; }
.gtf-missing { color: var(--danger); }
.gtf-heat-wrap { max-width: 100%; overflow-x: auto; border-radius: .65rem; }
.gtf-heat { border-collapse: separate; border-spacing: 2px; font-variant-numeric: tabular-nums; }
.gtf-heat th { padding: .2rem .35rem; color: var(--muted); font-size: .78rem; font-weight: 600; white-space: nowrap; text-align: center; }
.gtf-heat thead th { white-space: normal; min-width: 44px; max-width: 5rem; line-height: 1.2; }
.gtf-heat td { padding: 0; }
.gtf-heat button { width: 100%; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: .35rem; background: color-mix(in srgb, #2fbf8c calc(var(--level, 0) * 100%), #1a2233); font-weight: 800; }
.gtf-heat button[data-full="true"] { outline: 2px solid #ffd36e; outline-offset: -2px; }
.gtf-heat-detail { margin: 0; min-height: 1.5em; overflow-wrap: anywhere; }
.gtf-people { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.gtf-people li { display: inline-flex; align-items: center; gap: .2rem; padding-inline-start: .8rem; min-height: 44px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); overflow-wrap: anywhere; }
.gtf-people li:not(:has(button)) { padding-inline-end: .8rem; }
.gtf-x { min-width: 44px; border: 0; background: transparent; color: var(--muted); border-radius: 999px; }

.gtf-admin { border: 1px solid var(--border); border-radius: .85rem; }
.gtf-admin summary { display: flex; align-items: center; min-height: 48px; padding: .5rem 1rem; cursor: pointer; font-weight: 700; }
.gtf-admin .kit-actions { padding: 0 1rem 1rem; }
.gtf-own { margin: 0; text-align: center; }
.gtf-own a { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem 1rem; color: var(--accent); font-weight: 700; }

.gtf-recent { display: grid; gap: .5rem; padding: 1rem; border: 1px solid var(--border); border-radius: .85rem; }
.gtf-recent-list { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.gtf-recent-list li { display: flex; align-items: center; gap: .25rem; min-width: 0; }
.gtf-recent-list a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 700; overflow-wrap: anywhere; }

/* On narrow phones give the 7-column calendar and time chips the full width. */
@media (max-width: 420px) {
  body.kit .kit-tool { padding-inline: .5rem; }
  .gtf-cal { gap: 0; }
  .gtf-day { padding: .6rem; }
}
.gtf-range { white-space: nowrap; }
.gtf-slot { user-select: none; -webkit-user-select: none; }
/* On wide screens the save button sits after the chips instead of floating over them. */
@media (min-width: 900px) {
  .gtf-save-bar { position: static; background: none; padding: 0; }
}
