/**
 * Add a past gig (giggly-past-gig-form.js): the event page's layout in edit form, Festival Pro look.
 * Flyer left, details right, artists underneath; one column on phones.
 */
.gpg[hidden] { display: none !important; }
.gpg {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  font-family: 'League Spartan', system-ui, sans-serif;
  color: #e8eef0;
}
html.gpg-open { overflow: hidden; }
.gpg__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); }
.gpg__panel {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  background: #0b0f13;
  border: 1px solid rgba(119, 172, 162, 0.35);
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.gpg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.gpg__title {
  margin: 0;
  font: 700 28px/1.05 'League Spartan', sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: none;
}
.gpg__x {
  appearance: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #77aca2;
  color: #031926;
  cursor: pointer;
}
.gpg__body {
  overflow-y: auto;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  grid-template-areas: 'flyer info' 'artists artists';
  gap: 24px 32px;
}
.gpg__flyer-col { grid-area: flyer; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.gpg__info-col { grid-area: info; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.gpg__artists {
  grid-area: artists;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(119, 172, 162, 0.4);
}

/* the flyer box, 4:5 like a flyer */
.gpg__flyer {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  border: 2px dashed rgba(119, 172, 162, 0.7);
  background: #13171c;
  overflow: hidden;
  cursor: pointer;
}
.gpg__flyer.has-flyer { border-style: solid; border-color: rgba(119, 172, 162, 0.45); }
.gpg__flyer-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
  color: #77aca2;
}
.gpg__flyer-empty strong { font: 700 20px/1 'League Spartan', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; }
.gpg__flyer-empty span { font-size: 15px; color: #a3adb4; }
.gpg__flyer.has-flyer .gpg__flyer-empty { display: none; }
.gpg__flyer-bg,
.gpg__flyer-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.gpg__flyer-bg { object-fit: cover; filter: blur(18px) saturate(1.08); transform: scale(1.18); }
.gpg__flyer-img { object-fit: contain; }
.gpg__scan { margin: 0; font-size: 15px; line-height: 1.4; color: #a3adb4; }
.gpg__scan.is-busy { color: #77aca2; }
.gpg__scan.is-busy::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  animation: gpgSpin 0.8s linear infinite;
}
@keyframes gpgSpin { to { transform: rotate(360deg); } }

/* fields */
.gpg__field { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gpg__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gpg__label,
.gpg__h {
  margin: 0;
  font: 700 13px/1 'League Spartan', sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #77aca2;
}
.gpg__h { font-size: 20px; letter-spacing: 0.04em; color: #fff; }
.gpg__label em { font-style: normal; color: #ff6b81; }
.gpg__input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 2px 14px 0;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: #13171c;
  color: #fff;
  font: 500 17px/1 'League Spartan', sans-serif;
  color-scheme: dark;
}
.gpg__input:focus { outline: none; border-color: #77aca2; box-shadow: 0 0 0 3px rgba(119, 172, 162, 0.25); }
.gpg__input--title { height: 56px; font-size: 24px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.gpg__input[hidden] { display: none; }

/* suggestions under a search field */
.gpg__suggest {
  position: absolute;
  z-index: 5;
  top: 100%;
  left: 0;
  right: 0;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  max-height: 260px;
  overflow-y: auto;
  background: #13171c;
  border: 1px solid rgba(119, 172, 162, 0.5);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.gpg__suggest[hidden] { display: none; }
.gpg__suggest button {
  appearance: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  font: 600 16px/1.2 'League Spartan', sans-serif;
}
.gpg__suggest button span { font-weight: 400; font-size: 14px; color: #a3adb4; }
.gpg__suggest button:hover { background: rgba(119, 172, 162, 0.16); }
.gpg__suggest .gpg__suggest-new { color: #77aca2; text-transform: uppercase; font-size: 13px; letter-spacing: 0.06em; }

/* chips: the venue picked, and the artists */
.gpg__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gpg__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 2px 6px 0 14px;
  border-radius: 6px;
  background: rgba(119, 172, 162, 0.16);
  border: 1.5px solid rgba(119, 172, 162, 0.6);
  color: #fff;
  font: 700 15px/1 'League Spartan', sans-serif;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.gpg__chip small { font-weight: 500; font-size: 12px; letter-spacing: 0.04em; color: #a3adb4; }
.gpg__chip--locked { background: #77aca2; color: #031926; padding-right: 14px; }
.gpg__chip--new { border-style: dashed; }
.gpg__chip--venue { height: 48px; font-size: 17px; }
.gpg__chip button {
  appearance: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.gpg__chip button svg { width: 16px; height: 16px; }
.gpg__venue-picked[hidden] { display: none; }

/* footer */
.gpg__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 24px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.gpg__err { margin: 0 auto 0 0; color: #ff8a9a; font-size: 15px; }
.gpg__err[hidden] { display: none; }
.gpg__btn {
  appearance: none;
  height: 48px;
  padding: 3px 28px 0;
  border-radius: 6px;
  border: 0;
  background: #77aca2;
  color: #031926;
  font: 700 16px/1 'League Spartan', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.gpg__btn:disabled { opacity: 0.6; cursor: default; }
.gpg__btn--ghost { background: transparent; color: #e8eef0; border: 1.5px solid rgba(255, 255, 255, 0.5); }

@media (max-width: 760px) {
  .gpg { padding: 0; align-items: stretch; }
  .gpg__panel { max-height: 100dvh; border-radius: 0; }
  .gpg__body { grid-template-columns: 1fr; grid-template-areas: 'flyer' 'info' 'artists'; padding: 16px; }
  .gpg__flyer { max-width: 280px; margin: 0 auto; }
  .gpg__title { font-size: 22px; }
}
