/* ==========================================================================
   POLITICADE AUTHENTICATION & SAVED PLANS SYSTEM
   Universal styling for Accounts, Saved Plans, Modals, and Navigation
   ========================================================================== */

/* Navigation Auth & User Dropdown */
.site-nav-auth {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-user-dropdown {
  position: relative;
  display: inline-block;
}

.nav-user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-user-trigger:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

.user-avatar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #f97316 0%, #0284c7 100%);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-dropdown-caret {
  font-size: 0.75rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.nav-user-dropdown.open .nav-dropdown-caret {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: none;
  animation: authFadeIn 0.2s ease;
}

.nav-user-dropdown.open .nav-dropdown-menu {
  display: block;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
  padding: 0.6rem 0.75rem;
}

.dropdown-user-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #f8fafc;
}

.dropdown-user-email {
  font-size: 0.78rem;
  color: #94a3b8;
  word-break: break-all;
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0.35rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.dropdown-item.danger {
  color: #f87171;
}

.dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

/* ==========================================================================
   Save Plan Card (On Results Screen)
   ========================================================================== */
.save-plan-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid rgba(2, 132, 199, 0.35);
  border-radius: 16px;
  padding: 1.75rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.save-plan-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.save-plan-icon {
  font-size: 2.2rem;
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: 12px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.save-plan-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 0.25rem;
}

.save-plan-desc {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

.save-plan-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.save-plan-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.save-plan-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.save-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-save-plan-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #38bdf8;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.btn-save-plan-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.5);
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
}

.btn-view-saved-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view-saved-action:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.save-plan-feedback {
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  display: none;
}

.save-plan-feedback.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

/* ==========================================================================
   Auth Modal & Dialogs
   ========================================================================== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-modal-overlay.open {
  display: flex;
}

.auth-modal-dialog {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7);
  animation: authScale 0.25s ease;
  position: relative;
}

@keyframes authScale {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.auth-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.15s ease;
  line-height: 1;
}

.auth-modal-close:hover {
  color: #fff;
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-brand-badge {
  display: inline-block;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.auth-modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 0.35rem;
}

.auth-modal-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0;
}

.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.6rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.auth-tab-btn.active {
  background: #1e293b;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.auth-form-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
}

.auth-form-input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  color: #f8fafc;
  outline: none;
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.auth-form-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
}

.auth-form-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-size: 0.82rem;
  display: none;
}

.auth-form-error.visible {
  display: block;
}

.auth-submit-btn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid #38bdf8;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
}

.auth-demo-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #64748b;
  font-size: 0.78rem;
  margin: 0.5rem 0;
}

.auth-demo-divider::before,
.auth-demo-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-demo-divider span {
  padding: 0 0.75rem;
}

.auth-demo-btn {
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #fb923c;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-demo-btn:hover {
  background: rgba(249, 115, 22, 0.22);
  border-color: #f97316;
  color: #fdba74;
}

/* ==========================================================================
   Saved Plans Modal & Card List
   ========================================================================== */
.saved-plans-dialog {
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.saved-plans-body {
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  padding-right: 0.25rem;
}

.saved-plans-filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.saved-plans-filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.saved-plans-filter-btn.active {
  background: rgba(2, 132, 199, 0.2);
  border-color: #0284c7;
  color: #fff;
}

.saved-plans-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.saved-plan-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.2s ease;
}

.saved-plan-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.saved-plan-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.saved-plan-game-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.saved-plan-game-tag.budget {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.saved-plan-game-tag.texas {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.saved-plan-title-text {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f8fafc;
  margin: 0.25rem 0 0.15rem;
}

.saved-plan-date {
  font-size: 0.75rem;
  color: #94a3b8;
}

.saved-plan-grade-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.saved-plan-grade-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
  font-family: var(--font-mono, monospace);
}

.saved-plan-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.saved-plan-chip {
  font-size: 0.75rem;
  font-family: var(--font-mono, monospace);
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.saved-plan-chip.highlight {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.saved-plan-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.75rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.saved-plan-actions-left {
  display: flex;
  gap: 0.5rem;
}

.btn-plan-action {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.btn-plan-action.load {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-plan-action.load:hover {
  background: #10b981;
  color: #fff;
}

.btn-plan-action.copy {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
}

.btn-plan-action.copy:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-plan-action.delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.btn-plan-action.delete:hover {
  background: #ef4444;
  color: #fff;
}

.saved-plans-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #94a3b8;
}

.saved-plans-empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}
