/* ═══════════════════════════════════════════════════════════════════════════
   Festival Mode — CorkBoard Studio
   Copyright © 2025 Jack Allen. All Rights Reserved.
   ═══════════════════════════════════════════════════════════════════════════ */

#festival-app {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg, #f9fafb);
}

body.dark #festival-app {
  background: var(--bg, #0f1117);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.festival-layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.festival-content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 18px;
  align-items: start;
}

.festival-main   { display: flex; flex-direction: column; gap: 18px; }
.festival-sidebar { position: sticky; top: 16px; }

/* ── Constraints Banner ──────────────────────────────────────────────────── */
.fm-constraints-banner {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
body.dark .fm-constraints-banner {
  background: linear-gradient(135deg, #1a2d4a 0%, #1d4ed8 100%);
}
.fm-constraints-title {
  font-size: .65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .1em;
  opacity: .75;
  flex: 0 0 100%;
  margin-bottom: -4px;
}
.fm-constraints-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.fm-pill {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  padding: 5px 10px;
  gap: 1px;
  min-width: 72px;
}
.fm-pill-label {
  font-size: .58rem;
  font-weight: 700;
  opacity: .7;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.fm-pill-val {
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.3;
}
.fm-pill-note { max-width: 320px; }
.fm-pill-note .fm-pill-val {
  font-size: .74rem;
  font-weight: 500;
  white-space: normal;
  line-height: 1.45;
}
.fm-edit-constraints-btn {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: .77rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.fm-edit-constraints-btn:hover { background: rgba(255,255,255,.3); }

/* ── Section Card ────────────────────────────────────────────────────────── */
.fm-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
}
body.dark .fm-section {
  background: #1a1f2e;
  border-color: #2d3447;
}
.fm-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.fm-section-header h3 {
  margin: 0;
  font-size: .93rem;
  font-weight: 800;
  color: var(--ink, #111827);
}

/* ── Entry Cards ─────────────────────────────────────────────────────────── */
.fm-entries-list { display: flex; flex-direction: column; gap: 10px; }

.fm-entry-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: #f9fafb;
  transition: box-shadow .14s;
}
body.dark .fm-entry-card {
  background: #111827;
  border-color: #2d3447;
}
.fm-entry-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.09); }

.fm-entry-main  { flex: 1; min-width: 0; }
.fm-entry-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.fm-entry-name {
  font-weight: 800;
  font-size: .88rem;
  color: var(--ink, #111827);
}
.fm-entry-cat {
  font-size: .66rem;
  font-weight: 700;
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 5px;
  padding: 2px 7px;
}
body.dark .fm-entry-cat { background: #1e254a; color: #818cf8; }

.fm-entry-url {
  font-size: .72rem;
  color: #2563eb;
  text-decoration: none;
  display: inline-block;
  margin-top: 4px;
}
.fm-entry-url:hover { text-decoration: underline; }

.fm-deadlines { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }

.fm-deadline-tag {
  font-size: .67rem;
  font-weight: 600;
  border-radius: 5px;
  padding: 2px 7px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.fm-deadline-ok     { background: #f0fdf4; color: #15803d; }
.fm-deadline-soon   { background: #fffbeb; color: #92400e; }
.fm-deadline-urgent { background: #fef2f2; color: #dc2626; }
.fm-deadline-passed { background: #f3f4f6; color: #9ca3af; text-decoration: line-through; }

body.dark .fm-deadline-ok     { background: #14532d; color: #86efac; }
body.dark .fm-deadline-soon   { background: #451a03; color: #fcd34d; }
body.dark .fm-deadline-urgent { background: #450a0a; color: #fca5a5; }
body.dark .fm-deadline-passed { background: #1f2937; color: #6b7280; }

.fm-entry-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.fm-status-badge {
  font-size: .68rem;
  font-weight: 800;
  border-radius: 6px;
  padding: 3px 9px;
  white-space: nowrap;
}
.fm-fee-badge {
  font-size: .67rem;
  font-weight: 700;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 5px;
  padding: 2px 7px;
}
body.dark .fm-fee-badge { background: #1f2937; color: #9ca3af; }

.fm-entry-actions { display: flex; gap: 4px; }
.fm-action-btn {
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 3px 7px;
  cursor: pointer;
  font-size: .76rem;
  color: var(--muted, #6b7280);
  transition: background .12s, color .12s;
}
.fm-action-btn:hover { background: #f3f4f6; color: #111827; }
.fm-action-btn.danger:hover { background: #fef2f2; color: #dc2626; border-color: #fca5a5; }
body.dark .fm-action-btn { border-color: #2d3447; }
body.dark .fm-action-btn:hover { background: #1f2937; color: #e5e7eb; }

/* ── Empty State ─────────────────────────────────────────────────────────── */
.fm-empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted, #6b7280);
  font-size: .86rem;
  line-height: 1.6;
}
.fm-empty-state > div:first-child { font-size: 2.4rem; margin-bottom: 8px; }

/* ── Awards Grid ─────────────────────────────────────────────────────────── */
.fm-awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.fm-award-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  background: #f9fafb;
}
body.dark .fm-award-card { background: #111827; border-color: #2d3447; }
.fm-award-icon    { font-size: 2rem; margin-bottom: 6px; }
.fm-award-name    { font-size: .77rem; font-weight: 800; color: var(--ink, #111827); margin-bottom: 3px; }
.fm-award-status  { font-size: .67rem; font-weight: 700; color: var(--muted, #6b7280); }
.fm-award-specific{ font-size: .71rem; color: var(--brand, #2563eb); margin-top: 4px; font-style: italic; }

/* ── Press Kit Checklist ─────────────────────────────────────────────────── */
.fm-checklist-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
}
body.dark .fm-checklist-panel { background: #1a1f2e; border-color: #2d3447; }

.fm-checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.fm-checklist-header h3 {
  margin: 0;
  font-size: .9rem;
  font-weight: 800;
  color: var(--ink, #111827);
}
.fm-checklist-progress {
  font-size: .71rem;
  font-weight: 800;
  color: var(--brand, #2563eb);
  background: #eff6ff;
  border-radius: 20px;
  padding: 2px 9px;
}
body.dark .fm-checklist-progress { background: #1e3a5f; }

.fm-progress-bar {
  height: 5px;
  background: #e5e7eb;
  border-radius: 3px;
  margin-bottom: 12px;
  overflow: hidden;
}
body.dark .fm-progress-bar { background: #2d3447; }
.fm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #16a34a);
  border-radius: 3px;
  transition: width .3s ease;
}

.fm-checklist-items { display: flex; flex-direction: column; gap: 1px; }

.fm-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: background .1s;
  user-select: none;
}
.fm-checklist-item:hover { background: #f3f4f6; }
body.dark .fm-checklist-item:hover { background: #1f2937; }
.fm-checklist-item input[type=checkbox] {
  width: 14px;
  height: 14px;
  accent-color: var(--brand, #2563eb);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.fm-check-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: .81rem;
  font-weight: 600;
  color: var(--ink, #111827);
  line-height: 1.3;
}
.fm-check-sub { font-size: .67rem; font-weight: 500; color: var(--muted, #6b7280); }
.fm-checklist-item.fm-checked .fm-check-label { opacity: .45; text-decoration: line-through; }

/* ── Setup Modal extras ──────────────────────────────────────────────────── */
.fm-setup-intro {
  font-size: .84rem;
  color: var(--muted, #6b7280);
  line-height: 1.55;
  padding: 10px 14px;
  background: #f0f9ff;
  border-radius: 8px;
  border-left: 3px solid #2563eb;
}
body.dark .fm-setup-intro { background: #0c1a2e; }

.fm-setup-preview { min-height: 0; }
.fm-setup-deadline-note {
  font-size: .79rem;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 7px;
  padding: 7px 12px;
  line-height: 1.5;
}
body.dark .fm-setup-deadline-note { background: #1e3a5f; color: #93c5fd; }

.fm-setup-divider {
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted, #6b7280);
  padding: 8px 0 4px;
  border-bottom: 1px solid #e5e7eb;
}
body.dark .fm-setup-divider { border-color: #2d3447; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .festival-content-grid { grid-template-columns: 1fr; }
  .festival-sidebar       { position: static; }
  .festival-layout        { padding: 12px 14px 70px; }
  .fm-constraints-banner  { padding: 12px 14px; }
  .fm-entry-card          { flex-direction: column; }
  .fm-entry-meta {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .fm-awards-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
