/**
 * Admin Overlay Styles (INT-364)
 *
 * Floating editor panel for in-page landing page editing.
 * Uses a dark theme that contrasts with any landing page preset.
 * All selectors prefixed with admin-overlay- to avoid conflicts.
 */

/* ─── Panel Container ─────────────────────────────────────────────── */

#admin-overlay-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100vh;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  background: #1a1a2e;
  color: #e0e0e0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 13px;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

/* ─── Header ──────────────────────────────────────────────────────── */

.admin-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #16213e;
  border-bottom: 1px solid #2a2a4a;
  flex-shrink: 0;
}

.admin-overlay-title {
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.admin-overlay-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-overlay-link {
  color: #8b9cc7;
  font-size: 12px;
  text-decoration: none;
}

.admin-overlay-link:hover {
  color: #a5b4fc;
  text-decoration: underline;
}

.admin-overlay-close {
  background: none;
  border: none;
  color: #8b9cc7;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.admin-overlay-close:hover {
  color: #fff;
}

/* ─── Body (scrollable) ───────────────────────────────────────────── */

.admin-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* ─── Sections (collapsible) ──────────────────────────────────────── */

.admin-overlay-section {
  border-bottom: 1px solid #2a2a4a;
}

.admin-overlay-section summary {
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: #c5c5e0;
  user-select: none;
}

.admin-overlay-section summary:hover {
  color: #fff;
  background: #1e1e3a;
}

.admin-overlay-section[open] summary {
  color: #fff;
}

/* ─── Fields ──────────────────────────────────────────────────────── */

.admin-overlay-field {
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-overlay-field label {
  flex: 0 0 90px;
  font-size: 12px;
  color: #8b9cc7;
}

.admin-overlay-field input[type="text"],
.admin-overlay-field select {
  flex: 1;
  background: #0f0f23;
  border: 1px solid #2a2a4a;
  color: #e0e0e0;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
}

.admin-overlay-field input[type="text"]:focus,
.admin-overlay-field select:focus {
  outline: none;
  border-color: #6366f1;
}

.admin-overlay-field input[type="color"] {
  flex: 0 0 32px;
  height: 28px;
  padding: 2px;
  border: 1px solid #2a2a4a;
  border-radius: 4px;
  background: #0f0f23;
  cursor: pointer;
}

/* ─── Footer ──────────────────────────────────────────────────────── */

.admin-overlay-footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  background: #16213e;
  border-top: 1px solid #2a2a4a;
  flex-shrink: 0;
}

.admin-overlay-btn {
  flex: 1;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.admin-overlay-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-overlay-btn-primary {
  background: #6366f1;
  color: #fff;
}

.admin-overlay-btn-primary:hover:not(:disabled) {
  background: #4f46e5;
}

.admin-overlay-btn-secondary {
  background: #2a2a4a;
  color: #c5c5e0;
}

.admin-overlay-btn-secondary:hover:not(:disabled) {
  background: #3a3a5a;
}

/* ─── Status Toast ────────────────────────────────────────────────── */

.admin-overlay-status {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: system-ui, -apple-system, sans-serif;
  z-index: 100000;
  animation: admin-overlay-fade-in 0.2s ease-out;
}

.admin-overlay-status-success {
  background: #065f46;
  color: #a7f3d0;
}

.admin-overlay-status-error {
  background: #7f1d1d;
  color: #fca5a5;
}

.admin-overlay-status-info {
  background: #1e3a5f;
  color: #93c5fd;
}

@keyframes admin-overlay-fade-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
