/* ── Admin Mode Indicator ─────────────────────────────────────────────────── */
.admin-bar {
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 0.3rem;
  text-transform: uppercase;
}

/* ── Login Modal ──────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: #1a1a1e;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  transform: translateY(16px);
  transition: transform 0.25s ease;
}
.modal-backdrop.visible .modal {
  transform: translateY(0);
}

.modal h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.modal-field label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.modal-field input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #fff;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.modal-field input:focus {
  border-color: var(--accent);
}

.modal-error {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}
.modal-error.visible { display: block; }

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-secondary);
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.4); color: #fff; }

.btn-accent {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.2s;
}
.btn-accent:hover { opacity: 0.85; }
.btn-accent:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Admin card overlays ──────────────────────────────────────────────────── */
.admin-mode .gallery-item:hover .admin-actions {
  opacity: 1;
}
.admin-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.4rem;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}
.admin-actions button {
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.admin-actions .btn-edit:hover  { background: rgba(255,255,255,0.2); }
.admin-actions .btn-delete:hover { background: rgba(255,0,80,0.6); }

/* ── Add button in header ─────────────────────────────────────────────────── */
.btn-add {
  display: none;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.2s;
}
.btn-add:hover { opacity: 0.85; }
.admin-mode .btn-add { display: inline-flex; align-items: center; gap: 0.4rem; }

/* ── Upload / Edit Drawer ─────────────────────────────────────────────────── */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-backdrop.visible {
  opacity: 1;
  pointer-events: all;
}

.drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1e;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px 24px 0 0;
  padding: 2rem;
  z-index: 501;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-backdrop.visible .drawer {
  transform: translateY(0);
}

.drawer-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin: 0 auto 1.5rem;
}

.drawer-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.drawer-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .drawer-body { grid-template-columns: 1fr; }
}

/* Drop zone — looks like a gallery card */
.drop-zone {
  border: 2px dashed rgba(255,255,255,0.15);
  border-radius: 16px;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(255,0,123,0.04);
}
.drop-zone .drop-icon { font-size: 2rem; opacity: 0.4; }
.drop-zone .drop-label { font-size: 0.9rem; color: var(--text-secondary); }
.drop-zone .drop-sub   { font-size: 0.75rem; color: rgba(255,255,255,0.25); }

.drop-zone img,
.drop-zone video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}
.drop-zone .drop-change {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 100px;
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  display: none;
}
.drop-zone.has-file .drop-change { display: block; }
.drop-zone.has-file .drop-icon,
.drop-zone.has-file .drop-label,
.drop-zone.has-file .drop-sub { display: none; }

/* Form fields */
.drawer-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field input,
.field textarea,
.field select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
}
.field select option { background: #1a1a1e; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.social-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: end;
}
.social-row select { min-width: 130px; }

.upload-progress {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  display: none;
}
.upload-progress.visible { display: block; }
.upload-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

.drawer-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── Card description + social link ──────────────────────────────────────── */
.card-meta {
  padding: 0.9rem 1rem 1rem;
  background: #111113;
  border-radius: 0 0 16px 16px;
}
.card-meta .card-caption {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}
.card-meta .card-social {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.card-meta .card-social:hover { opacity: 0.75; }
.card-meta .card-social svg { width: 13px; height: 13px; fill: currentColor; }

/* adjust card border-radius when meta is present */
.gallery-item.has-meta {
  border-radius: 16px;
  overflow: visible;
}
.gallery-item.has-meta .card-img-wrap {
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  position: relative;
}
