/* ═══════════════════════════════════════════════════════════
   Admin Event Modal
   ═══════════════════════════════════════════════════════════ */

.adm-overlay {
  position: fixed; inset: 0;
  z-index: 9000;
  display: flex; align-items: flex-start; justify-content: center;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 40px 16px;
}

.adm-modal {
  background: var(--surface, #13161c);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%; max-width: 520px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.adm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.adm-header h2 {
  margin: 0; font-size: 18px; font-weight: 700;
  color: var(--text);
}
.adm-close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 4px; line-height: 0;
}
.adm-close:hover { color: var(--text); }

.adm-body {
  padding: 16px 20px 20px;
  display: flex; flex-direction: column; gap: 12px;
}

.adm-label {
  font-size: 12px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: -6px;
}

.adm-input, .adm-select, .adm-textarea {
  width: 100%; box-sizing: border-box;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.adm-input::placeholder, .adm-textarea::placeholder { color: var(--muted); }
.adm-input:focus, .adm-select:focus, .adm-textarea:focus {
  border-color: var(--accent);
}

.adm-select {
  appearance: auto;
  cursor: pointer;
}

.adm-textarea {
  resize: vertical; min-height: 70px;
}

.adm-row {
  display: flex; gap: 12px;
}
.adm-col { flex: 1; display: flex; flex-direction: column; gap: 4px; }

/* Image preview */
.adm-img-wrap { margin-top: -4px; }
.adm-img-preview {
  width: 100%; height: 120px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background-size: cover; background-position: center;
  transition: border-color .15s;
}
.adm-img-preview:hover { border-color: var(--accent); }
.adm-img-preview span {
  font-size: 13px; color: var(--muted); font-weight: 500;
}

/* Error message */
.adm-error {
  color: var(--error); font-size: 13px; font-weight: 600;
  min-height: 18px;
}

/* Action buttons */
.adm-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px;
}

.adm-btn {
  border: none; border-radius: 10px; padding: 10px 20px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: opacity .15s, filter .15s;
}
.adm-btn:hover { filter: brightness(1.1); }
.adm-btn:disabled { opacity: .5; cursor: default; }

.adm-btn-primary {
  background: var(--accent); color: var(--bg);
}
.adm-btn-danger {
  background: rgba(248,113,113,.15); color: var(--error);
  border: 1px solid rgba(248,113,113,.3);
}
.adm-btn-danger:hover { background: rgba(248,113,113,.25); }
.adm-btn-ghost {
  background: var(--surface2); color: var(--muted);
}

/* Admin FAB (floating action button) — only shown for admins */
.admin-fab {
  position: fixed; bottom: 80px; right: 20px; z-index: 50;
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(139,92,246,.6) 0%, rgba(236,72,153,.5) 50%, rgba(59,130,246,.5) 100%);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  box-shadow:
    0 4px 20px rgba(139,92,246,.35),
    0 0 30px rgba(236,72,153,.15),
    inset 0 1px 0 rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .3s ease;
}
.admin-fab:hover {
  transform: scale(1.12) rotate(90deg);
  box-shadow:
    0 8px 32px rgba(139,92,246,.5),
    0 0 48px rgba(236,72,153,.25),
    0 0 16px rgba(59,130,246,.2),
    inset 0 1px 0 rgba(255,255,255,.25);
}
.admin-fab:active {
  transform: scale(0.92) rotate(90deg);
  transition-duration: .08s;
}
.admin-fab svg { pointer-events: none; }

/* ── Link Import Strip ──────────────────────────────────── */
.adm-link-strip {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(124,156,255,.08) 0%, rgba(167,139,250,.06) 100%);
  border: 1px solid rgba(124,156,255,.2);
  border-radius: 12px;
  transition: border-color .2s;
}
.adm-link-strip:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,156,255,.1);
}
.adm-link-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(124,156,255,.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.adm-link-input {
  flex: 1; min-width: 0;
  background: none; border: none;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  padding: 4px 0;
}
.adm-link-input::placeholder { color: var(--muted); opacity: .7; }
.adm-link-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  background: var(--accent);
  color: var(--bg);
  border: none; border-radius: 8px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: filter .15s, opacity .15s;
}
.adm-link-btn:hover { filter: brightness(1.15); }
.adm-link-btn:disabled { opacity: .5; cursor: default; }

.adm-link-status {
  font-size: 12px; font-weight: 600;
  min-height: 16px;
  padding: 0 4px;
  transition: color .2s;
}
.adm-link-status:empty { display: none; }
.adm-link-success { color: var(--success, #4ade80); }
.adm-link-error { color: var(--error, #f87171); }

/* Divider between link import and manual fields */
.adm-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 4px 0;
}
.adm-divider-line {
  flex: 1; height: 1px;
  background: var(--border);
}
.adm-divider-text {
  font-size: 11px; font-weight: 600;
  color: var(--muted); opacity: .6;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}

/* ── Smart-add Tabs ────────────────────────────────────────── */
.smart-add-tabs {
  display: flex;
  gap: 0;
  background: var(--bg);
  border-radius: 10px;
  padding: 3px;
}
.smart-add-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.smart-add-tab.active {
  background: var(--surface2);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.smart-add-tab:hover:not(.active) { color: var(--text-dim); }
.smart-add-tab svg { flex-shrink: 0; }

/* ── Smart Panels ──────────────────────────────────────────── */
.smart-panel { display: none; }
.smart-panel.active { display: block; }

/* ── Flyer Upload Zone ─────────────────────────────────────── */
.flyer-upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: all .25s ease;
}
.flyer-upload-zone:hover, .flyer-upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(255, 107, 157, .04);
}
.flyer-upload-zone.drag-over {
  transform: scale(1.01);
  box-shadow: 0 0 0 4px var(--accent-dim);
}
.flyer-upload-icon {
  width: 50px; height: 50px;
  margin: 0 auto 10px;
  background: linear-gradient(135deg, var(--vita-v), var(--vita-i), var(--vita-t));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 107, 157, .2);
}
.flyer-upload-title {
  font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 3px;
}
.flyer-upload-hint {
  font-size: 12px; color: var(--muted); margin-bottom: 12px;
}
.flyer-upload-formats {
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap;
}
.flyer-format-badge {
  background: var(--surface3);
  color: var(--text-dim);
  font-size: 10px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ── Flyer Preview ─────────────────────────────────────────── */
.flyer-preview { display: none; }
.flyer-preview.active { display: block; }
.flyer-preview-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.flyer-preview-actions {
  display: flex; gap: 8px; margin-top: 10px;
}
.flyer-use-btn { flex: 1; }

@media (max-width: 760px) {
  .adm-overlay { padding: 20px 12px 80px; }
  .admin-fab { bottom: 76px; right: 16px; }
  .smart-add-tab { font-size: 11px; padding: 9px 6px; gap: 4px; }
  .smart-add-tab svg { width: 13px; height: 13px; }
}
