/* ============================================================
   FBC Forney Tech Events — Event-specific styles
   Supplements styles/main.css (loaded first in events.html)
   ============================================================ */

/* ── Filter pills (Upcoming / Past) ──────────────────────── */
.view-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border-radius: 6px;
  padding: 3px;
}

.view-tab {
  padding: 5px 14px;
  border-radius: 4px;
  border: none;
  background: transparent;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}

.view-tab.active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  font-weight: 600;
}

.view-tab:not(.active):hover {
  color: var(--text);
}

/* ── Month filter pills ───────────────────────────────────── */
.month-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.month-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-right: 4px;
}

.month-pill {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}

.month-pill:hover {
  background: var(--bg);
  color: var(--text);
}

.month-pill.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ── Allow views to expand past viewport so #main-content scrolls ── */
#view-events, #view-calendar, #view-venues, #view-tech-needs, #view-staff {
  min-height: unset;
}


/* ── Events list ──────────────────────────────────────────── */
.events-list-content {
  flex: 1;
  padding: 0 0 40px;
  max-width: 1200px;
}

.events-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}

.events-empty .mi {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  color: var(--text-light);
}

.events-empty p {
  font-size: 15px;
  margin-bottom: 16px;
}

/* ── Month group header ───────────────────────────────────── */
.events-month-group {
  margin: 0;
}

.events-month-heading {
  padding: 12px 24px 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
}

/* ── Event row ────────────────────────────────────────────── */
.event-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 2fr) minmax(0, 1fr) auto;
  gap: 0;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background .12s;
}

.event-row:hover {
  background: var(--surface-alt);
}

/* date column */
.event-date-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
}

.event-date-day {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-dark);
  line-height: 1;
}

.event-date-weekday {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* details column */
.event-details-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.event-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.event-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.event-time {
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}

.event-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* badge styles */
.event-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.event-badge--venue {
  background: #e8f0fe;
  color: #1a56db;
}

.event-badge--need {
  background: #fef3c7;
  color: #92400e;
}

.event-staff-inline {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 5px;
  flex-wrap: nowrap;
}

.staff-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.staff-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 8px 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.staff-pill-remove {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 1px;
}
.staff-pill-remove:hover { color: #fff; }

.staff-input-wrap {
  position: relative;
}

.staff-inline-input {
  min-width: 250px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 12px;
  font-size: 13px;
  font-family: inherit;
  width: 120px;
  outline: none;
  background: var(--bg);
  color: var(--text);
}
.staff-inline-input:focus { border-color: var(--navy); }

.staff-autocomplete {
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  z-index: 100;
  overflow: hidden;
}

.staff-ac-item {
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}
.staff-ac-item:hover { background: var(--hover); }

.event-notes-col {
  padding: 0 16px;
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
  align-self: center;
}

/* actions column */
.event-actions-col {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  padding-left: 16px;
}

/* ── Venues / Tech Needs tables ───────────────────────────── */
.db-table-container {
  padding: 24px;
  flex: 1;
  max-width: 1200px;
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.db-table th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: var(--surface-alt);
  border-bottom: 2px solid var(--border);
}

.db-table td {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.db-table tr:last-child td {
  border-bottom: none;
}

.db-table tr:hover td {
  background: var(--surface-alt);
}

.db-table .actions-col {
  width: 80px;
  text-align: right;
}

.db-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.venue-abbr-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #e8f0fe;
  color: #1a56db;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

/* ── Event modal specifics ────────────────────────────────── */
.member-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--surface);
}

.member-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 0;
}

.member-checkbox-item input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: var(--navy);
}

.member-checkbox-item label {
  cursor: pointer;
  user-select: none;
}

.member-checkboxes-empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  padding: 4px 0;
}

/* ── Modal structure (header / body / footer) ─────────────── */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0;
}

.modal-body {
  margin-bottom: 0;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Form helpers ─────────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  background: var(--bg);
}

.form-input:focus {
  border-color: var(--navy-light);
  background: #fff;
}

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

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

/* ── Notes textarea ───────────────────────────────────────── */
textarea.form-input {
  resize: vertical;
  min-height: 60px;
}

/* ── Loading overlay ──────────────────────────────────────── */
#events-loading {
  position: fixed;
  inset: 0;
  background: rgba(240, 244, 248, .85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  font-size: 15px;
  color: var(--navy);
  font-weight: 600;
  gap: 12px;
}

.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Confirm delete dialog ────────────────────────────────── */
.confirm-dialog {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.confirm-dialog h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.confirm-dialog p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.confirm-dialog .confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* ── Calendar ─────────────────────────────────────────────── */
.calendar-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.calendar-dow-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--surface-alt);
  border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}

.calendar-dow {
  text-align: center;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(100px, auto);
  flex: 1;
}

.calendar-cell {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 8px;
  min-height: 100px;
  background: var(--surface);
  cursor: pointer;
  transition: background .1s;
  vertical-align: top;
  overflow: hidden;
}

.calendar-cell:nth-child(7n) { border-right: none; }

.calendar-cell:hover { background: var(--surface-alt); }

.calendar-cell--other-month {
  background: var(--bg);
  cursor: default;
}

.calendar-cell--other-month .calendar-day-num {
  color: var(--text-light);
}

.calendar-cell--today .calendar-day-num {
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
}

.calendar-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.calendar-event-chip {
  display: block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--navy);
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background .1s;
}

.calendar-event-chip:hover { background: var(--navy-dark); }

.calendar-event-chip--time {
  opacity: .75;
  font-size: 10px;
}

/* ── Calendar tooltip ────────────────────────────────────── */
.cal-tooltip {
  position: fixed;
  z-index: 800;
  background: #1e2d3d;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  max-width: 260px;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  line-height: 1.5;
}
.cal-tooltip__name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}
.cal-tooltip__time {
  color: #a8c4e0;
  margin-bottom: 6px;
}
.cal-tooltip__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}
.cal-tooltip__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #7a9ab8;
  margin-bottom: 2px;
}
.cal-tooltip__badge {
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
}
.cal-tooltip__badge--byn {
  background: #b7860b;
}
.cal-tooltip__group {
  color: #a8c4e0;
  font-style: italic;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .event-row {
    grid-template-columns: 60px 1fr auto;
    padding: 10px 16px;
  }
  .event-notes-col { display: none; }
  .event-date-day { font-size: 18px; }
  .event-name { font-size: 14px; }
}

/* ── BYN Badge (list view) ────────────────────────────────── */
.event-badge--byn {
  background: #b7860b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: .04em;
}
.event-byn-group {
  font-size: 12px;
  color: #6b7a8d;
  margin-top: 2px;
}

/* ── BYN Flag checkbox in event modal ─────────────────────── */
.byn-flag-row {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 4px;
}
.byn-flag-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.byn-flag-label--inline {
  font-size: 13px;
}
.byn-flag-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

/* ── BYN Full-Screen Editor ───────────────────────────────── */
.byn-editor {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: #f0f4f8;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.byn-editor.hidden { display: none; }

.byn-editor__header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}
.byn-editor__header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.byn-badge-lg {
  background: #b7860b;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: .06em;
}
.byn-editor__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}
.byn-editor__subtitle {
  font-size: 13px;
  color: var(--text-muted);
}
.byn-editor__header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.byn-editor__body {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.byn-section {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
}
.byn-section__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.byn-section__hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  margin-top: -6px;
}
.byn-section__hint a { color: var(--navy); }

.byn-radio-group {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 6px;
}
.byn-radio-group label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  cursor: pointer;
}
