/* Shared styling for everything under /admin — the inline site editor
   (body.is-admin, scoped so it has zero effect on the public site) and the
   four dedicated management pages (Music/Media/Bookings/Design), which are
   separate static pages that also load this file. */

body.is-admin{ padding-bottom: 76px; }

body.is-admin [data-edit]{
  outline: 1px dashed rgba(242,242,238,0.35);
  outline-offset: 3px;
  cursor: text;
  border-radius: 2px;
  transition: outline-color 0.15s ease, background 0.15s ease;
}
body.is-admin [data-edit]:hover{ outline-color: var(--lime); }
body.is-admin [data-edit]:focus{
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  background: rgba(198,217,44,0.08);
}

body.is-admin [data-edit-img],
body.is-admin .admin-img-wrap{ position: relative; }

/* ---------- reusable small widgets (used on the site AND the dedicated pages) ---------- */
.admin-img-edit-btn{
  position: absolute;
  z-index: 5;
  bottom: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5em 0.8em;
  border-radius: 999px;
  border: 2px solid var(--white);
  background: rgba(10,10,10,0.85);
  color: var(--white);
  cursor: pointer;
}
.admin-img-edit-btn:hover{ background: var(--lime); color: var(--black); border-color: var(--lime); }

.admin-delete-btn{
  position: absolute;
  z-index: 6;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--pink);
  background: rgba(10,10,10,0.85);
  color: var(--pink);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}
.admin-delete-btn:hover{ background: var(--pink); color: var(--white); }

.tour-item, .gallery-item{ position: relative; }

.admin-add-tile{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 140px;
  border: 3px dashed rgba(242,242,238,0.4);
  border-radius: 3px 20px 4px 24px / 20px 4px 24px 3px;
  color: var(--grey);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  aspect-ratio: 1;
}
.admin-add-tile:hover{ border-color: var(--lime); color: var(--lime); }

/* ---------- floating toolbar (Site tab only) ---------- */
.admin-toolbar{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem clamp(1rem, 3vw, 2rem);
  background: rgba(10,10,10,0.97);
  border-top: 2px solid var(--lime);
  font-family: var(--font-body);
  max-height: 45vh;
  overflow-y: auto;
}
@media (max-width: 640px){
  body.is-admin{ padding-bottom: 260px; }
  .admin-toolbar{ justify-content: center; text-align: center; }
  .admin-toolbar__status{ flex: 1 0 100%; text-align: center; }
  .admin-toolbar__actions{ justify-content: center; width: 100%; }
}
.admin-toolbar__status{
  font-size: 0.8rem;
  color: var(--grey);
  flex: 1;
}
.admin-toolbar__status.is-dirty{ color: var(--lime); }
.admin-toolbar__actions{ display: flex; gap: 0.75rem; flex-wrap: wrap; }
.admin-toolbar .btn{ font-size: 0.75rem; padding: 0.7em 1.3em; }

/* ---------- top tab bar (all admin pages) ---------- */
/* Fixed (not sticky) so mounting it never shifts already-laid-out content —
   on the Site editor page that shift used to trigger the browser's scroll
   anchoring and push the bar off-screen. z-index sits above .nav (1000, only
   present on the Site editor page, which embeds the public header). */
.admin-tabs{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1001;
  height: var(--admin-tabs-height, 56px);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 0 clamp(1rem, 4vw, 3rem);
  background: rgba(10,10,10,0.97);
  border-bottom: 2px solid var(--lime);
  font-family: var(--font-body);
  flex-wrap: wrap;
}
/* Site editor page only: make room above the public header for this bar. */
body.is-admin .nav{ top: var(--admin-tabs-height, 56px); }
body.is-admin{ --nav-height: calc(68px + var(--admin-tabs-height, 56px)); }
.admin-tabs__brand{
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  margin-right: 0.5rem;
}
.admin-tabs a{
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
  padding: 0.4em 0;
  border-bottom: 2px solid transparent;
}
.admin-tabs a:hover{ color: var(--white); }
.admin-tabs a.is-active{ color: var(--lime); border-color: var(--lime); }
.admin-tabs__spacer{ flex: 1; }

/* ---------- dedicated page layout ---------- */
.admin-page{
  max-width: 900px;
  margin: 0 auto;
  padding: calc(var(--admin-tabs-height, 56px) + clamp(2rem, 5vw, 3.5rem)) var(--gutter) 6rem;
}
.admin-page h1{
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.5rem;
}
.admin-page__intro{
  color: var(--grey);
  margin-bottom: 2.5rem;
  max-width: 60ch;
}
.admin-section-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin: 2.5rem 0 1rem;
}

.admin-list{
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.admin-row{
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--black-soft);
  border: 2px solid rgba(242,242,238,0.15);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.admin-row__thumb{
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex: none;
  background: rgba(242,242,238,0.06);
}
.admin-row__thumb--empty{
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey);
  font-size: 0.6rem;
  text-align: center;
  text-transform: uppercase;
}
.admin-row__body{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.admin-row__title{
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(242,242,238,0.25);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.3rem 0.1rem;
}
.admin-row__title:focus{ outline: none; border-color: var(--lime); }
.admin-row__meta{ font-size: 0.75rem; color: var(--grey); }
.admin-row__actions{ display: flex; align-items: center; gap: 0.4rem; flex: none; }
.admin-icon-btn{
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(242,242,238,0.3);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
}
.admin-icon-btn:hover{ border-color: var(--lime); color: var(--lime); }
.admin-icon-btn.is-danger:hover{ border-color: var(--pink); color: var(--pink); }
.admin-icon-btn:disabled{ opacity: 0.3; cursor: not-allowed; }

.admin-form{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--black-soft);
  border: 2px dashed rgba(242,242,238,0.3);
  border-radius: 10px;
  padding: 1.25rem;
  align-items: flex-end;
}
.admin-field{ display: flex; flex-direction: column; gap: 0.4rem; flex: 1; min-width: 160px; }
.admin-field label{ font-size: 0.7rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.05em; }
.admin-field input, .admin-field select{
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(242,242,238,0.3);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.5rem 0.1rem;
}
.admin-field input:focus, .admin-field select:focus{ outline: none; border-color: var(--lime); }
.admin-field input[type="color"]{ height: 42px; padding: 0; border: 2px solid var(--white); border-radius: 8px; cursor: pointer; }

.admin-dropzone{
  border: 3px dashed rgba(242,242,238,0.35);
  border-radius: 14px;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--grey);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.admin-dropzone:hover, .admin-dropzone.is-dragover{
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(198,217,44,0.06);
}
.admin-dropzone strong{ display: block; color: var(--white); font-size: 1.1rem; margin-bottom: 0.4rem; }

.admin-upload-list{ margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.admin-upload-item{
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.85rem; color: var(--grey);
  background: var(--black-soft);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
}
.admin-upload-item.is-done{ color: var(--lime); }
.admin-upload-item.is-error{ color: var(--pink); }

.admin-empty{ color: var(--grey); font-size: 0.9rem; padding: 1.5rem 0; }

.admin-colors{
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.admin-colors label{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-colors input[type="color"]{
  width: 40px;
  height: 40px;
  border: 2px solid var(--white);
  border-radius: 50%;
  padding: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
}

.admin-login-banner{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 3000;
  background: var(--lime);
  color: var(--black);
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.5rem;
}
