/* Package A2 — hero page headers, event mode switch, lightbox metadata */

/* The score strip is now the actual page header everywhere except Start. */
.tutte-hero-strip {
  min-height: 104px !important;
  height: 104px !important;
  flex-basis: 104px !important;
}
.tutte-hero-page-heading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 28px 18px 24px;
}
.tutte-hero-page-copy {
  min-width: 0;
  padding: 6px 18px 6px 0;
  background: transparent !important;
}
.tutte-hero-page-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3vw, 2.55rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: #27364d;
}
.tutte-hero-page-subtitle {
  margin-top: 6px;
  color: #667286;
  font-size: .98rem;
  font-weight: 500;
}
.tutte-hero-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  z-index: 2;
}
.tutte-hero-page-actions form { margin: 0; }

/* Old in-content headers are no longer part of the page composition. */
.tutte-page-heading { display: none !important; }
.tutte-inline-page-title { display: none !important; }

/* Header action buttons remain understated. */
.btn-tutte-edit {
  color: #526a5b;
  background: #f0f5f1;
  border-color: #d5e0d8;
}
.btn-tutte-edit:hover,
.btn-tutte-edit:focus {
  color: #3f5748;
  background: #e6efe8;
  border-color: #c6d6ca;
}
.btn-tutte-delete {
  color: #7a5559;
  background: #f8f0f1;
  border-color: #ead8da;
}
.btn-tutte-delete:hover,
.btn-tutte-delete:focus {
  color: #663f44;
  background: #f2e4e6;
  border-color: #dfc6c9;
}

/* 'Nowy' is visually distinct from ordinary status chips until Package B removes it as a separate flag. */
.tutte-status-new {
  color: #745c2c !important;
  background: #fbf4df !important;
  border-color: #eadba8 !important;
}

/* Events: mutually-exclusive Planowane / Historyczne switch. */
.tutte-event-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.tutte-event-controls .tutte-filter-details { margin: 0; }
.tutte-event-mode-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}
.tutte-event-mode-label {
  color: var(--tutte-text-soft);
  font-size: .82rem;
  font-weight: 600;
}
.tutte-event-mode-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #d9dfe6;
  border-radius: 11px;
  background: rgba(255,255,255,.92);
}
.tutte-event-mode-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  padding: 7px 14px;
  border-radius: 8px;
  color: #657184;
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
}
.tutte-event-mode-option:hover { color: var(--tutte-burgundy); }
.tutte-event-mode-option.active {
  color: #6f3137;
  background: #f4e8e9;
  box-shadow: 0 1px 4px rgba(80,35,40,.08);
}
.tutte-date-range {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 12px;
}

/* Gallery filters use exactly the same family as the other list pages. */
.gallery-filter-details > summary,
.tutte-filter-details > summary {
  color: #59677a !important;
  background: #f8f9fa !important;
  border-color: #dce2e9 !important;
}
.gallery-filter-details[open] > summary,
.tutte-filter-details[open] > summary {
  color: #6f3137 !important;
  background: #f7eeee !important;
  border-color: #e5cfd1 !important;
}

/* Lightbox: both arrows stay above the image and metadata follows selected gallery fields. */
.gallery-lightbox-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: calc(100vw - 150px);
  max-height: calc(100vh - 70px);
}
.gallery-lightbox-stage .gallery-lightbox-image {
  max-width: 100%;
  max-height: calc(100vh - 165px);
}
.gallery-lightbox-meta {
  width: min(900px, 88vw);
  min-height: 30px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  color: rgba(255,255,255,.92);
  background: rgba(0,0,0,.42);
  text-align: center;
  font-size: .84rem;
  line-height: 1.4;
}
.gallery-lightbox-meta-main {
  color: #fff;
  font-weight: 600;
  margin-bottom: 2px;
}
.gallery-lightbox-prev,
.gallery-lightbox-next {
  z-index: 5 !important;
  width: 50px !important;
  height: 50px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.2) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.gallery-lightbox-prev { left: 22px !important; }
.gallery-lightbox-next { right: 22px !important; }
.gallery-lightbox-close { z-index: 6 !important; }
.gallery-lightbox-counter { z-index: 5 !important; }

/* Photo add form. */
.tutte-upload-drop {
  padding: 18px;
  border: 1px dashed #cbd4df;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}

@media (max-width: 767.98px) {
  .tutte-hero-strip {
    min-height: 92px !important;
    height: 92px !important;
    flex-basis: 92px !important;
  }
  .tutte-hero-page-heading {
    padding: 12px 14px 12px 52px;
    gap: 10px;
  }
  .tutte-hero-page-title { font-size: 1.55rem; }
  .tutte-hero-page-subtitle { font-size: .8rem; margin-top: 3px; }
  .tutte-hero-page-actions { gap: 6px; }
  .tutte-hero-page-actions .btn { font-size: .76rem; padding: .35rem .55rem; }
  .tutte-date-range { grid-template-columns: 1fr; }
  .tutte-event-controls { align-items: stretch; }
  .tutte-event-mode-bar { width: 100%; }
  .tutte-event-mode-switch { width: 100%; }
  .tutte-event-mode-option { flex: 1 1 50%; min-width: 0; }
  .gallery-lightbox-stage {
    max-width: calc(100vw - 34px);
    max-height: calc(100vh - 88px);
  }
  .gallery-lightbox-stage .gallery-lightbox-image {
    max-height: calc(100vh - 190px);
  }
  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    width: 42px !important;
    height: 42px !important;
  }
  .gallery-lightbox-prev { left: 4px !important; }
  .gallery-lightbox-next { right: 4px !important; }
  .gallery-lightbox-meta { width: calc(100vw - 44px); font-size: .78rem; }
}
