/* ========================================
   Get Together — Schedule grid & timeline
   ======================================== */

.gt-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px;
}

.gt-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* Header */
.gt-header {
  margin-bottom: 32px;
}

.gt-header h1 {
  margin-bottom: 8px;
}

.gt-intro {
  font-size: var(--font-size-base);
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* Map */
.gt-map {
  margin-bottom: 20px;
}

.gt-map-img {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  border-radius: 8px;
  cursor: pointer;
  transition: max-height 0.3s ease;
}

.gt-map-img.gt-map-zoomed {
  max-height: none;
}

/* Day toggle */
.gt-day-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.gt-day-btn {
  flex: 1;
  padding: 12px 16px;
  font-size: var(--font-size-base);
  font-weight: 600;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gt-day-btn.active {
  background: var(--sering-yellow);
  border-color: var(--sering-olive);
  color: var(--sering-olive);
}

.gt-day-btn:hover:not(.active) {
  border-color: var(--text-muted);
}

/* Admin controls */
.gt-admin-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

/* ─── Desktop Grid ───────────────────────────────────────────────────── */

.gt-grid {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

.gt-grid-row {
  display: flex;
  min-height: 48px;
  border-bottom: 1px solid var(--border-light);
}

.gt-grid-row:last-child {
  border-bottom: none;
}

.gt-grid-header {
  background: var(--bg-primary);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 32px;
}

.gt-grid-label {
  min-width: 120px;
  max-width: 120px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: var(--font-size-sm);
  color: var(--text-primary);
  border-right: 1px solid var(--border-light);
  display: flex;
  align-items: center;
}

.gt-grid-cells {
  flex: 1;
  position: relative;
  display: flex;
  min-width: 600px;
}

.gt-grid-header .gt-grid-cells {
  display: flex;
}

.gt-grid-header-cell {
  flex: 1;
  text-align: center;
  padding: 6px 2px;
  border-left: 1px solid var(--border-light);
}

.gt-grid-header-cell:first-child {
  border-left: none;
}

/* Grid row cells need relative positioning for blocks */
.gt-grid-row:not(.gt-grid-header) .gt-grid-cells {
  display: block;
  position: relative;
  min-height: 64px;
}

/* ─── Time Blocks (grid bars) ────────────────────────────────────────── */

.gt-block {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  transition: opacity 0.15s;
  z-index: 1;
}

.gt-block:hover {
  opacity: 0.85;
}

.gt-block:focus-visible {
  outline: 2px solid var(--sering-olive);
  outline-offset: 2px;
}

.gt-block-expanded {
  outline: 2px solid var(--sering-olive);
  outline-offset: 1px;
}

.gt-block-project {
  background: var(--sering-olive);
  color: var(--sering-off-white);
}

.gt-block-custom {
  background: var(--sering-red);
  color: #fff;
}

.gt-block-title {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  flex-shrink: 0;
}

.gt-block-time {
  font-size: 11px;
  white-space: nowrap;
  opacity: 0.9;
}

.gt-block-signup {
  font-size: 10px;
  opacity: 0.8;
}

/* ─── Mobile Timeline ─────────────────────────────────────────────────── */

.gt-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gt-timeline-card {
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  border-left: 4px solid transparent;
  background: var(--bg-card);
  transition: background 0.15s;
}

.gt-timeline-card:hover {
  background: var(--bg-card-hover);
}

.gt-timeline-card:focus-visible {
  outline: 2px solid var(--sering-olive);
  outline-offset: 2px;
}

.gt-timeline-card.gt-block-project {
  border-left-color: var(--sering-olive);
  background: var(--bg-card);
  color: var(--text-primary);
}

.gt-timeline-card.gt-block-custom {
  border-left-color: var(--sering-red);
  background: var(--bg-card);
  color: var(--text-primary);
}

.gt-card-expanded {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.gt-card-time {
  font-weight: 700;
  font-size: var(--font-size-base);
}

.gt-card-location {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 4px;
}

.gt-card-title {
  font-weight: 600;
  font-size: var(--font-size-base);
  margin-bottom: 4px;
}

.gt-card-signup {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ─── Block Detail fold-out ──────────────────────────────────────────── */

.gt-detail {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin-top: 12px;
  animation: gt-slide-in 0.2s ease;
}

@keyframes gt-slide-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.gt-detail h3 {
  margin-bottom: 8px;
}

.gt-detail-project-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--sering-olive);
  text-underline-offset: 2px;
}
.gt-detail-project-link:hover {
  color: var(--sering-olive);
}

.gt-detail-meta {
  display: flex;
  gap: 12px;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.gt-detail-desc {
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.gt-detail-items h4 {
  margin-top: 16px;
  margin-bottom: 8px;
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.gt-detail-admin {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
}

/* ─── Sign-up section ─────────────────────────────────────────────────── */

.gt-signup-section {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.gt-signup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.gt-signup-header h4 {
  margin: 0;
}

.gt-signup-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  margin-left: 8px;
}

.gt-signup-names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gt-signup-name {
  background: var(--bg-primary);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: var(--font-size-sm);
}

.gt-signup-more {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  padding: 2px 8px;
}

.gt-signup-prompt {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-style: italic;
}

.gt-signup-leave {
  background: transparent;
  border-color: var(--text-muted);
  color: var(--text-secondary);
}

/* ─── Prep section ────────────────────────────────────────────────────── */

.gt-prep-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}

.gt-prep-section h2 {
  margin-bottom: 20px;
}

.gt-prep-done {
  text-align: center;
  padding: 24px;
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
}

.gt-prep-day {
  margin-bottom: 32px;
}

.gt-prep-day > h3 {
  margin-bottom: 16px;
}

.gt-prep-category {
  margin-bottom: 24px;
}

.gt-prep-category h4 {
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

/* Tasks in prep reuse .task-item from projects.css */
.gt-prep-tasks {
  display: flex;
  flex-direction: column;
}

.gt-prep-task {
  cursor: pointer;
}

.gt-prep-task .task-status-btn {
  cursor: default;
}

/* Project badge inside prep items */
.gt-prep-project {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 1px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Tools table head override (3 columns: status, name, qty) */
.gt-tool-head {
  grid-template-columns: 60px 1fr 60px !important;
}
.gt-tool-head ~ .shopping-row {
  grid-template-columns: 60px 1fr 60px;
}

/* ─── Empty state ─────────────────────────────────────────────────────── */

.gt-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: var(--font-size-base);
}

/* ─── Modals ──────────────────────────────────────────────────────────── */

.gt-block-modal {
  max-width: 500px;
}

.gt-block-modal label {
  display: block;
  margin-bottom: 12px;
  font-weight: 500;
  font-size: var(--font-size-sm);
}

.gt-block-modal select,
.gt-block-modal input[type="text"],
.gt-block-modal input[type="number"],
.gt-block-modal textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: var(--font-size-base);
  font-family: inherit;
}

.gt-form-times {
  display: flex;
  gap: 12px;
}

.gt-form-times label {
  flex: 1;
}

.gt-form-toggle {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-direction: row !important;
}

.gt-form-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.gt-loc-modal {
  max-width: 500px;
}

.gt-loc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.gt-loc-name {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: var(--font-size-base);
  font-family: inherit;
}

.gt-loc-add {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.gt-loc-add input {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: var(--font-size-base);
  font-family: inherit;
}

/* ─── Nav badge for Get Together ──────────────────────────────────────── */

#nav-links a[data-screen="get-together"] {
  background: var(--sering-yellow);
  color: var(--sering-olive) !important;
  font-weight: 700;
  border: 2px solid var(--sering-olive);
  box-shadow: 0 1px 4px rgba(73, 76, 26, 0.2);
}

#nav-links a[data-screen="get-together"]:hover {
  background: #f5dc3d;
}

#nav-links a[data-screen="get-together"].active {
  background: var(--sering-olive);
  color: var(--sering-yellow) !important;
  border-color: var(--sering-olive);
  box-shadow: 0 1px 4px rgba(73, 76, 26, 0.3);
}

/* ─── Block detail slot (inline after card) ──────────────────────────── */

.gt-block-detail-slot {
  /* Sits inline in the timeline flow */
}

/* ─── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  .gt-day-toggle {
    position: sticky;
    top: 44px;
    z-index: 10;
    background: var(--bg-primary);
    padding: 8px 0;
  }

  .gt-grid {
    display: none;
  }

  .gt-admin-controls {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  /* Bottom nav: compact Get Together label */
  #nav-links a[data-screen="get-together"] {
    border: none;
    box-shadow: none;
    background: transparent;
    font-weight: 700;
    color: var(--sering-olive);
  }

  #nav-links a[data-screen="get-together"].active {
    background: var(--sering-olive);
    color: var(--sering-yellow);
  }

  .gt-day-toggle {
    top: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gt-detail {
    animation: none;
  }
}
