/* Tour hero banner + photo upload modal */
.page-tour .tour-hero--banner {
  padding-top: calc(var(--tour-logo-clearance) + 56px);
  padding-bottom: 88px;
  min-height: min(72vh, 720px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.tour-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.tour-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.tour-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(12, 9, 10, 0.45) 0%,
    rgba(12, 9, 10, 0.72) 45%,
    rgba(12, 9, 10, 0.92) 100%
  );
}

.tour-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.tour-hero--banner .page-hero {
  background: transparent;
}

.tour-hero--banner .tour-meta {
  background: rgba(12, 9, 10, 0.35);
  backdrop-filter: blur(8px);
}

.tour-hero-media {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.tour-hero-edit-photos {
  flex-shrink: 0;
  background: rgba(12, 9, 10, 0.82);
  border-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.tour-hero-edit-photos:hover {
  background: rgba(12, 9, 10, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
}

.tour-hero-img-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
  font-size: 14px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
}

.tour-photos-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.tour-photos-modal[hidden] {
  display: none;
}

.tour-photos-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.tour-photos-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: min(90vh, 520px);
  overflow: visible;
  padding: 22px 22px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tour-photos-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.tour-photos-modal__head h2 {
  font-size: 20px;
  margin: 0;
}

.tour-photos-modal__head p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-dim);
}

.tour-photos-modal__close {
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.tour-photos-modal__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tour-photos-fields {
  display: grid;
  gap: 14px;
}

@media (min-width: 420px) {
  .tour-photos-fields {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

.tour-photos-field {
  margin-bottom: 0;
}

.tour-photos-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.tour-photos-preview {
  margin-top: 6px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-2);
  height: 56px;
  width: min(100%, calc(56px * 16 / 9));
  max-width: 100%;
  aspect-ratio: 16 / 9;
}

.tour-photos-preview--hero {
  width: min(100%, calc(56px * 5 / 4));
  aspect-ratio: 5 / 4;
}

.tour-photos-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tour-photos-preview-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 0 6px;
  font-size: 11px;
  text-align: center;
  color: var(--text-muted);
}

.tour-photos-field input[type="file"] {
  width: 100%;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.tour-photos-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.tour-photos-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
