/* =============================================
   JustShadi — App Extra Styles
   Sidebar, App Layout Additions, Admin, etc.
   ============================================= */

/* ── Sidebar Enhanced ── */
.sidebar {
  width: 260px; min-height: 100vh;
  background: var(--white); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 200; overflow-y: auto;
}
.sidebar-logo { padding: 20px 20px 16px; border-bottom: 1px solid var(--border); }
.sidebar-user { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.sidebar-nav { flex: 1; padding: 12px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 0.875rem; font-weight: 500;
  transition: all 0.2s; text-decoration: none; position: relative;
}
.sidebar-link:hover { background: var(--cream); color: var(--navy); }
.sidebar-link.active { background: rgba(139,26,26,0.08); color: var(--crimson); font-weight: 600; }
.sidebar-link.active svg { stroke: var(--crimson); }
.sidebar-badge {
  margin-left: auto; background: var(--crimson); color: var(--white);
  font-size: 0.65rem; font-weight: 700; border-radius: 50px;
  padding: 2px 7px; min-width: 18px; text-align: center;
}

/* ── Toast Additions ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9990; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 14px 20px; background: var(--navy); color: var(--white);
  border-radius: var(--radius-md); border-left: 4px solid var(--gold);
  font-size: 0.875rem; max-width: 320px;
  transform: translateX(110%); opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.success { border-color: #22c55e; }
.toast.error   { border-color: #ef4444; }
.toast.info    { border-color: var(--gold); }

/* ── App Forms ── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; letter-spacing: 0.02em; }
.form-input, .form-select {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; color: var(--text); background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s; outline: none;
  font-family: var(--font-sans);
}
.form-input:focus, .form-select:focus {
  border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(139,26,26,0.08);
}
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B5B5B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }

/* ── Profile Card Overlay Actions ── */
.profile-card {
  position: relative; border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border);
  background: var(--white); transition: var(--transition);
}
.profile-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.profile-card-actions {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px; background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  display: flex; gap: 8px; justify-content: center;
  transform: translateY(100%); transition: transform 0.3s ease;
}
.profile-card:hover .profile-card-actions { transform: translateY(0); }
.card-action-btn {
  padding: 8px 16px; border-radius: 50px; font-size: 0.78rem; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s;
}

/* ── Search Filters Panel ── */
.filter-panel {
  background: var(--white); border-radius: var(--radius-md);
  padding: 24px; border: 1px solid var(--border); margin-bottom: 24px;
}
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }

/* ── Range Slider ── */
.range-slider-track { height: 4px; background: var(--cream-dark); border-radius: 2px; position: relative; }
.range-slider-fill  { height: 100%; background: linear-gradient(90deg, var(--crimson), var(--gold)); border-radius: 2px; }
.range-thumb {
  width: 18px; height: 18px; background: var(--crimson);
  border: 2px solid var(--white); border-radius: 50%;
  position: absolute; top: 50%; transform: translateY(-50%);
  cursor: pointer; box-shadow: 0 2px 6px rgba(139,26,26,0.3);
}

/* ── Kundli Gauge ── */
.compat-gauge { position: relative; width: 140px; height: 140px; }
.compat-gauge svg { transform: rotate(-90deg); }
.compat-gauge-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.compat-score { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; color: var(--navy); }
.compat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

/* ── Chat Enhancements ── */
/* Canonical .chat-layout/.chat-sidebar rules (previously duplicated in
   main.css with different height/width values — this is the merged,
   single source of truth; the effective values match what was actually
   rendering before, since this file loaded after main.css and won). */
.chat-layout { display: flex; height: calc(100vh - 72px); background: var(--white); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.chat-sidebar { width: 320px; min-width: 320px; border-right: 1px solid var(--border); background: var(--white); display: flex; flex-direction: column; flex-shrink: 0; }
.chat-sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); }
.chat-search { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 50px; font-size: 0.875rem; outline: none; background: var(--cream); }
.chat-search:focus { border-color: var(--crimson); background: var(--white); }
.chat-list { flex: 1; overflow-y: auto; }
.chat-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; transition: background 0.2s; border-bottom: 1px solid var(--border); }
.chat-item:hover, .chat-item.active { background: var(--cream); }
.chat-avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; overflow: hidden; }
.chat-info { flex: 1; min-width: 0; }
.chat-name { font-weight: 600; font-size: 0.875rem; color: var(--navy); }
.chat-preview { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-time { font-size: 0.7rem; color: var(--text-muted); }
.chat-unread { width: 20px; height: 20px; background: var(--crimson); border-radius: 50%; color: var(--white); font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--white); }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; background: var(--cream); display: flex; flex-direction: column; gap: 10px; }
.message { display: flex; flex-direction: column; max-width: 70%; }
.message.sent { align-self: flex-end; align-items: flex-end; }
.message.received { align-self: flex-start; align-items: flex-start; }
.message-bubble {
  padding: 12px 16px; border-radius: 18px; font-size: 0.9rem; line-height: 1.5;
}
.message.sent .message-bubble { background: var(--crimson); color: var(--white); border-bottom-right-radius: 4px; }
.message.received .message-bubble { background: var(--white); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.message-time { font-size: 0.68rem; color: var(--text-muted); margin-top: 4px; padding: 0 4px; }
.chat-input-bar { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); background: var(--white); }
.chat-input { flex: 1; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: 50px; font-size: 0.9rem; outline: none; }
.chat-input:focus { border-color: var(--crimson); }
.chat-send-btn {
  width: 44px; height: 44px; border-radius: 50%; background: var(--crimson);
  border: none; color: var(--white); cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.chat-send-btn:hover { background: var(--crimson-dark); transform: scale(1.05); }

/* ── Notification Items ── */
.notif-item {
  display: flex; gap: 16px; padding: 18px 24px;
  border-bottom: 1px solid var(--border); transition: background 0.2s;
}
.notif-item.unread { background: rgba(139,26,26,0.03); }
.notif-item:hover { background: var(--cream); }
.notif-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; }
.notif-content { flex: 1; }
.notif-title { font-weight: 600; color: var(--navy); font-size: 0.875rem; margin-bottom: 3px; }
.notif-body  { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
.notif-time  { font-size: 0.72rem; color: var(--text-muted); margin-top: 5px; }

/* ── Steps Progress (Registration) ── */
.steps-progress { display: flex; align-items: center; gap: 0; }
.step-indicator { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.step-dot {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
  background: var(--white); transition: all 0.3s; position: relative; z-index: 1;
}
.step-dot.active { border-color: var(--crimson); background: var(--crimson); color: var(--white); }
.step-dot.done   { border-color: #22c55e; background: #22c55e; color: var(--white); }
.step-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); white-space: nowrap; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 4px; position: relative; top: -12px; }

/* ── Multi-step Form ── */
.form-step { display: none; }
.form-step.active { display: block; }

/* ── Privacy Toggle ── */
.privacy-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle-track {
  width: 44px; height: 24px; background: var(--text-muted);
  border-radius: 50px; position: relative; transition: background 0.3s;
}
.toggle-track.on { background: var(--crimson); }
.toggle-thumb {
  width: 18px; height: 18px; background: var(--white); border-radius: 50%;
  position: absolute; top: 3px; left: 3px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-track.on .toggle-thumb { transform: translateX(20px); }

/* ── Blurred/Private Photo ── */
.photo-blur { filter: blur(12px); transition: filter 0.4s; }
.photo-blur:hover { filter: blur(4px); }
.photo-locked {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
}
.photo-locked-overlay {
  position: absolute; inset: 0;
  background: rgba(26,26,46,0.6); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--white); font-size: 0.8rem; gap: 8px;
}

/* ── Interest Action Buttons ── */
.interest-card { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--white); border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: 12px; transition: box-shadow 0.2s; }
.interest-card:hover { box-shadow: var(--shadow-sm); }
.interest-actions { margin-left: auto; display: flex; gap: 8px; }
.btn-accept { background: #22c55e; color: var(--white); border: none; padding: 8px 18px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-accept:hover { background: #16a34a; transform: translateY(-1px); }
.btn-decline { background: transparent; color: var(--text-muted); border: 1px solid var(--border); padding: 8px 18px; border-radius: 50px; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.btn-decline:hover { background: var(--cream); color: var(--navy); }

/* ── Video Call UI ── */
.video-call-container { position: fixed; inset: 0; background: var(--navy); z-index: 9999; display: none; flex-direction: column; }
.video-main { flex: 1; position: relative; }
.video-self { position: absolute; bottom: 20px; right: 20px; width: 160px; aspect-ratio: 16/9; border-radius: var(--radius-md); overflow: hidden; border: 2px solid rgba(255,255,255,0.2); }
.video-controls { padding: 24px; display: flex; justify-content: center; gap: 16px; background: rgba(0,0,0,0.3); }
.video-btn { width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.video-btn.danger { background: #ef4444; color: var(--white); }
.video-btn.muted  { background: rgba(255,255,255,0.15); color: var(--white); }
.video-btn.muted:hover { background: rgba(255,255,255,0.25); }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .sidebar-link, .chat-item, .notif-item, .profile-card, .interest-card { transition: none; }
  .toggle-thumb { transition: none; }
}
