/* ================================================================
   SastiCarSell Auth Plugin — style.css
   All selectors scoped under .scs-* to avoid theme conflicts
   ================================================================ */

/* ── Reset & base ── */
.scs-auth-wrap *,
.scs-dashboard * {
  box-sizing: border-box;
}

/* ════════════════════════════════════════════════════════════════
   AUTH FORM (login + signup)
════════════════════════════════════════════════════════════════ */
.scs-auth-wrap {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  max-width: 500px;
  margin: 40px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 48px rgba(0,0,0,.13);
  overflow: hidden;
}

/* Header */
.scs-auth-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #0f3460 100%);
  padding: 30px 36px 26px;
  text-align: center;
}
.scs-auth-icon { font-size: 36px; display: block; margin-bottom: 8px; }
.scs-auth-brand {
  font-size: 22px; font-weight: 800; color: #fff;
  letter-spacing: -.02em;
}
.scs-auth-tagline { font-size: 13px; color: #94a3b8; margin-top: 4px; }

/* Tabs — !important used to override Motors theme button/color resets */
.scs-tabs {
  display: flex !important;
  background: #f0f4f8 !important;
  border-bottom: 2px solid #dde3ea !important;
}
.scs-auth-wrap .scs-tabs .scs-tab,
.scs-auth-wrap .scs-tabs button.scs-tab {
  flex: 1 !important;
  padding: 15px 0 !important;
  background: #f0f4f8 !important;
  border: none !important;
  border-bottom: 3px solid transparent !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #111111 !important;
  -webkit-text-fill-color: #111111 !important;
  text-shadow: none !important;
  transition: color .2s, border-color .2s, background .2s !important;
  margin-bottom: -2px !important;
  font-family: inherit !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  line-height: 1.4 !important;
}
.scs-auth-wrap .scs-tabs .scs-tab.active,
.scs-auth-wrap .scs-tabs button.scs-tab.active {
  color: #111111 !important;
  -webkit-text-fill-color: #111111 !important;
  border-bottom: 3px solid #e63946 !important;
  background: #ffffff !important;
}
.scs-auth-wrap .scs-tabs .scs-tab:hover:not(.active),
.scs-auth-wrap .scs-tabs button.scs-tab:hover:not(.active) {
  color: #111827 !important;
  background: #e8edf2 !important;
}

/* Final theme-override safeguard: keep both tab labels visibly black. */
.scs-auth-wrap .scs-tabs .scs-tab,
.scs-auth-wrap .scs-tabs .scs-tab.active,
.scs-auth-wrap .scs-tabs button.scs-tab,
.scs-auth-wrap .scs-tabs button.scs-tab.active {
  color: #111111 !important;
  -webkit-text-fill-color: #111111 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Panels — force dark text throughout to override Motors theme */
.scs-panel { display: none; }
.scs-panel.active { display: block; }
.scs-panel-inner { padding: 28px 36px 36px; background: #ffffff !important; }

.scs-auth-wrap .scs-panel-inner h2,
.scs-auth-wrap .scs-panel-inner h2 * {
  font-size: 21px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin-bottom: 4px !important;
  letter-spacing: -.02em !important;
}
.scs-auth-wrap .scs-sub,
.scs-auth-wrap p.scs-sub {
  font-size: 13px !important;
  color: #64748b !important;
  margin-bottom: 24px !important;
}
/* Ensure the whole widget has white bg and dark text */
.scs-auth-wrap,
.scs-auth-wrap * {
  -webkit-text-fill-color: unset !important;
}

/* Field row (two columns) */
.scs-field-row { display: flex; gap: 14px; }
.scs-field-row .scs-field { flex: 1; }

/* Individual field */
.scs-field { margin-bottom: 16px; }
.scs-field label {
  display: block;
  font-size: 11.5px; font-weight: 700;
  color: #374151;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 6px;
}
.scs-field input,
.scs-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px; color: #111;
  background: #f9fafb;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-family: inherit;
}
.scs-field input:focus,
.scs-field textarea:focus {
  border-color: #0f3460;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(15,52,96,.10);
}
.scs-field input.scs-invalid { border-color: #e63946; background: #fff5f5; }
.scs-field input[readonly] { background: #f1f5f9; color: #64748b; cursor: default; }
.scs-field textarea { resize: vertical; min-height: 80px; }

/* Password wrapper */
.scs-pw-wrap { position: relative; }
.scs-pw-wrap input { padding-right: 44px; }
.scs-eye {
  position: absolute; right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: #9ca3af; padding: 0; line-height: 0;
  display: flex; align-items: center;
}
.scs-eye:hover { color: #475569; }

/* Strength meter */
.scs-strength { margin-top: 7px; display: none; }
.scs-strength.visible { display: block; }
.scs-strength-track {
  height: 4px; border-radius: 4px;
  background: #e2e8f0; overflow: hidden; margin-bottom: 4px;
}
.scs-strength-fill {
  height: 100%; border-radius: 4px;
  width: 0; transition: width .3s, background .3s;
}
.scs-strength-label { font-size: 11px; font-weight: 700; }

/* Error messages */
.scs-err {
  display: none;
  font-size: 11.5px; color: #e63946;
  font-weight: 500; margin-top: 5px;
}
.scs-err.show { display: block; }

/* Alert boxes */
.scs-alert {
  display: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  margin-bottom: 18px;
}
.scs-alert.ok  { background:#f0fdf4; color:#166534; border:1.5px solid #bbf7d0; display:block; }
.scs-alert.err { background:#fef2f2; color:#991b1b; border:1.5px solid #fecaca; display:block; }

/* Remember checkbox */
.scs-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #64748b;
  margin-bottom: 18px; cursor: pointer;
}
.scs-remember input { accent-color: #0f3460; width: 15px; height: 15px; }

/* Terms — single line, compact */
.scs-auth-wrap .scs-terms-label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 12.5px !important;
  color: #374151 !important;
  line-height: 1.3 !important;
  margin-bottom: 6px !important;
  cursor: pointer !important;
  white-space: nowrap !important;   /* keeps it on one line */
  flex-wrap: nowrap !important;
}
.scs-auth-wrap .scs-terms-label input[type="checkbox"] {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  accent-color: #0f3460 !important;
  cursor: pointer !important;
}
.scs-auth-wrap .scs-terms-label a {
  color: #0f3460 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  white-space: nowrap !important;
}

/* Buttons */
.scs-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 20px;
  border: none; border-radius: 9px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .2s, transform .1s, box-shadow .2s;
  font-family: inherit; text-decoration: none;
  letter-spacing: .01em;
}
.scs-btn-primary {
  background: #e63946; color: #fff;
  box-shadow: 0 3px 14px rgba(230,57,70,.28);
}
.scs-btn-primary:hover { background: #c1121f; box-shadow: 0 4px 20px rgba(193,18,31,.35); }
.scs-btn-primary:active { transform: scale(.98); }
.scs-btn-primary:disabled { background: #fca5a5; box-shadow: none; cursor: not-allowed; }
.scs-btn { width: 100%; }

/* Spinner */
.scs-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; border-radius: 50%;
  animation: scs-spin .65s linear infinite;
  display: none; flex-shrink: 0;
}
@keyframes scs-spin { to { transform: rotate(360deg); } }

/* Switch link */
.scs-switch-link {
  text-align: center; font-size: 13px;
  color: #64748b; margin-top: 20px;
}
.scs-switch-link a { color: #0f3460; font-weight: 700; text-decoration: none; }
.scs-switch-link a:hover { text-decoration: underline; }

/* Already logged in */
.scs-already-logged-in, .scs-not-logged-in {
  text-align: center; padding: 24px;
  font-size: 15px; color: #475569;
}
.scs-already-logged-in a, .scs-not-logged-in a { color: #0f3460; font-weight: 700; }

/* ════════════════════════════════════════════════════════════════
   DASHBOARD
════════════════════════════════════════════════════════════════ */
.scs-dashboard {
  display: flex; gap: 28px;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  max-width: 1100px; margin: 0 auto;
  min-height: 600px;
}

/* Sidebar */
.scs-sidebar {
  width: 240px; flex-shrink: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 28px rgba(0,0,0,.08);
  padding: 28px 20px 24px;
  display: flex; flex-direction: column;
  align-items: center;
  height: fit-content;
}

/* Avatar */
.scs-avatar-wrap { margin-bottom: 16px; text-align: center; }
.scs-avatar-ring {
  position: relative; width: 96px; height: 96px;
  border-radius: 50%; overflow: hidden;
  border: 3px solid #e63946;
  margin: 0 auto 10px;
}
.scs-avatar-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.scs-avatar-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.48);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s; cursor: pointer;
  border-radius: 50%;
}
.scs-avatar-ring:hover .scs-avatar-overlay { opacity: 1; }
.scs-avatar-status {
  font-size: 12px; color: #16a34a; font-weight: 600;
  min-height: 16px; text-align: center;
}

.scs-sidebar-name  { font-size: 16px; font-weight: 800; color: #0f172a; text-align: center; }
.scs-sidebar-email { font-size: 12px; color: #64748b; text-align: center; margin-top: 2px; word-break: break-all; }
.scs-sidebar-badge {
  margin-top: 10px;
  padding: 4px 12px; border-radius: 20px;
  background: #fef2f2; color: #e63946;
  font-size: 11.5px; font-weight: 700;
}
.scs-sidebar-since { font-size: 11px; color: #94a3b8; margin-top: 4px; }

/* Nav */
.scs-nav { width: 100%; margin-top: 20px; }
.scs-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: #475569;
  text-decoration: none; transition: background .15s, color .15s;
  margin-bottom: 4px;
}
.scs-nav-link:hover { background: #f1f5f9; color: #0f172a; }
.scs-nav-link.active { background: #eff6ff; color: #0f3460; }

.scs-logout-btn {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 20px;
  width: 100%; background: none; border: none;
  font-size: 13px; color: #94a3b8; cursor: pointer;
  font-family: inherit; font-weight: 600;
  justify-content: center;
  transition: color .2s;
}
.scs-logout-btn:hover { color: #e63946; }

/* Main content */
.scs-main { flex: 1; min-width: 0; }
.scs-section { display: none; }
.scs-section.active { display: block; }

.scs-section-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.scs-section-header h2 {
  font-size: 20px; font-weight: 800; color: #0f172a;
  margin-bottom: 3px;
}
.scs-section-sub { font-size: 13px; color: #64748b; }

.scs-add-btn { width: auto !important; white-space: nowrap; }

/* Car grid */
.scs-listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.scs-car-card {
  background: #fff; border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.scs-car-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.10); }
.scs-car-thumb {
  position: relative; aspect-ratio: 4/3;
  background: #f1f5f9; overflow: hidden;
}
.scs-car-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.scs-car-no-thumb {
  display:flex; align-items:center; justify-content:center;
  width:100%; height:100%; font-size:36px; color:#cbd5e1;
}
.scs-status-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 10.5px; font-weight: 700; padding: 3px 8px;
  border-radius: 20px; text-transform: uppercase;
}
.scs-status-live    { background:#dcfce7; color:#166534; }
.scs-status-pending { background:#fef9c3; color:#854d0e; }
.scs-status-draft   { background:#f1f5f9; color:#64748b; }

.scs-car-info { padding: 12px 14px 14px; }
.scs-car-title { font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.scs-car-date  { font-size: 11.5px; color: #94a3b8; margin-bottom: 10px; }
.scs-car-actions { display: flex; gap: 10px; }
.scs-action-link {
  font-size: 12px; font-weight: 700; color: #0f3460;
  text-decoration: none; padding: 4px 10px;
  border: 1.5px solid #dbeafe; border-radius: 6px;
  transition: background .15s;
}
.scs-action-link:hover { background: #eff6ff; }

/* Empty state */
.scs-empty {
  text-align: center; padding: 60px 24px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.scs-empty-icon { font-size: 48px; margin-bottom: 16px; }
.scs-empty h3 { font-size: 18px; font-weight: 800; color: #0f172a; margin-bottom: 6px; }
.scs-empty p  { font-size: 14px; color: #64748b; margin-bottom: 20px; }
.scs-empty .scs-btn { width: auto; }

/* Profile form */
.scs-profile-form {
  background: #fff; border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  padding: 28px 32px 32px;
  max-width: 560px;
}
.scs-profile-form .scs-btn { margin-top: 8px; }
.scs-readonly-note { font-weight: 400; color: #94a3b8; text-transform: none; letter-spacing: 0; }

/* Responsive */
@media (max-width: 768px) {
  .scs-dashboard { flex-direction: column; }
  .scs-sidebar { width: 100%; }
  .scs-panel-inner { padding: 22px 18px 28px; }
  .scs-auth-header { padding: 22px 18px 18px; }
  .scs-field-row { flex-direction: column; gap: 0; }
  .scs-listings-grid { grid-template-columns: 1fr 1fr; }
  .scs-profile-form { padding: 20px 16px 24px; }
}
@media (max-width: 480px) {
  .scs-listings-grid { grid-template-columns: 1fr; }
}
