/*
 * auth.css — Styles for auth.js injected widgets
 * Modal overlays, user nav menu, tier badges, admin panel
 */

/* ── Overlay / Modal ───────────────────────────────────────────────────────── */
.oc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  backdrop-filter: blur(2px);
}

.oc-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.oc-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #1e293b;
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  flex-shrink: 0;
}

.oc-modal-body {
  padding: 24px;
  overflow-y: auto;
}

.oc-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.oc-close:hover { color: #fff; }

/* ── Auth tabs ─────────────────────────────────────────────────────────────── */
.oc-tab {
  background: none;
  border: none;
  padding: 8px 18px;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  color: #64748b;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
}
.oc-tab-active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  font-weight: 600;
}

/* ── Form fields ───────────────────────────────────────────────────────────── */
.oc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.oc-field label {
  font-size: .82rem;
  color: #64748b;
  font-weight: 500;
}
.oc-field input {
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: .9rem;
  font-family: inherit;
  color: #1a1d29;
  outline: none;
  transition: border-color 0.15s;
}
.oc-field input:focus { border-color: #3b82f6; }

.oc-error {
  color: #ef4444;
  font-size: .82rem;
  margin: 4px 0 0;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.oc-btn-primary {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.oc-btn-primary:hover { background: #2563eb; }
.oc-btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }

.oc-btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.oc-btn-secondary:hover { background: #e2e8f0; }

/* ── Google SSO button ─────────────────────────────────────────────────────── */
.oc-google-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: .88rem;
  color: #1a1d29;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s;
  font-family: inherit;
}
.oc-google-btn:hover { background: #f8fafc; }

/* ── User menu / nav widget ────────────────────────────────────────────────── */
.oc-tier-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.oc-user-menu {
  position: relative;
}

.oc-user-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 5px 12px 5px 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: .85rem;
  color: #1a1d29;
  transition: background 0.15s;
}
.oc-user-btn:hover { background: #f1f5f9; }

.oc-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.oc-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 220px;
  z-index: 8000;
  overflow: hidden;
}

.oc-drop-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  background: none;
  border: none;
  font-size: .87rem;
  color: #374151;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.oc-drop-item:hover { background: #f8fafc; }

/* ── Admin table buttons ───────────────────────────────────────────────────── */
.oc-admin-btn {
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

/* ── Tier gate overlay (page lock) ────────────────────────────────────────── */
#tier-gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, 0.97);
  z-index: 7000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 40px;
}
#tier-gate-overlay .gate-icon {
  font-size: 3rem;
  line-height: 1;
}
#tier-gate-overlay h2 {
  margin: 0;
  font-size: 1.4rem;
  color: #1a1d29;
}
#tier-gate-overlay p {
  margin: 0;
  color: #64748b;
  font-size: .95rem;
  max-width: 380px;
}

/* ── Locked nav link ───────────────────────────────────────────────────────── */
.nav-locked {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
  cursor: not-allowed;
}
.nav-lock-icon {
  font-size: .7rem;
  vertical-align: middle;
  margin-left: 3px;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .oc-modal { width: 95vw !important; }
}
