/* account.css — account shell + tabs (S8a/S8b). Requires base.css (+ commerce.css for orders). */
/* ==================== Account page (Session 8a) ==================== */

/* ---- Layout: sidebar + main ---- */
.account-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1024px) {
  .account-shell {
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
  }
}

/* ---- Sidebar ---- */
.account-sidebar {
  position: sticky;
  top: 88px;
}

@media (max-width: 1023px) {
  .account-sidebar {
    position: relative;
    top: 0;
    width: 100%;
  }
}

/* ---- Sidebar nav ---- */
.account-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.account-nav::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1024px) {
  .account-nav {
    flex-direction: column;
    overflow-x: visible;
  }
}

/* ---- Nav item base ---- */
.account-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 500;
  font-size: 14px;
  color: #4A4548;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.account-nav-item:hover {
  background-color: rgba(255, 64, 0, 0.06);
  color: #201E1F;
}

/* Active state — desktop: left border accent + tint; mobile: solid pill */
@media (min-width: 1024px) {
  .account-nav-item.is-active {
    background-color: rgba(255, 64, 0, 0.1);
    color: #FF4000;
    box-shadow: inset 3px 0 0 #FF4000;
    font-weight: 600;
  }
}

@media (max-width: 1023px) {
  .account-nav-item.is-active {
    background-color: #FF4000;
    color: #FEEFDD;
    font-weight: 600;
  }
}

/* ---- Tab content area ---- */
.account-tab-content[hidden] {
  display: none;
}


/* ---- Password strength bar ---- */
/* ---- Password strength bar ---- */
.password-strength-bar {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.password-strength-bar .seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background-color: #F8DBC0;
  transition: background-color 0.2s ease;
}

.password-strength-bar.is-weak .seg:nth-child(1) {
  background-color: #FF4000;
}

.password-strength-bar.is-medium .seg:nth-child(-n+2) {
  background-color: #FAAA8D;
}

.password-strength-bar.is-strong .seg {
  background-color: #5BA85A;
}

.password-strength-label {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.password-strength-label.is-weak { color: #FF4000; }
.password-strength-label.is-medium { color: #FAAA8D; }
.password-strength-label.is-strong { color: #5BA85A; }
/* ==================== Account page Tabs (Session 8b) ==================== */

/* ---- Order filter pills ---- */
.order-filter button {
  padding: 8px 16px;
  border-radius: 9999px;
  background-color: #FFFFFF;
  border: 1px solid #F2C5A5;
  color: #4A4548;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.order-filter button:hover {
  border-color: #FF4000;
  color: #201E1F;
}

.order-filter button.is-active {
  background-color: #201E1F;
  color: #FEEFDD;
  border-color: #201E1F;
}

/* ---- Order card ---- */
.order-card {
  background-color: #FFFFFF;
  border: 1px solid #F8DBC0;
  border-radius: 20px;
  padding: 18px 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.order-card:hover {
  border-color: #F2C5A5;
  box-shadow: 0 8px 24px -12px rgba(250, 170, 141, 0.4);
}

.order-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #F8DBC0;
  margin-bottom: 4px;
}

/* ---- Order status badge (3 variants) ---- */
.order-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.order-status-badge.is-completed {
  background-color: rgba(91, 168, 90, 0.15);
  color: #3F7E3F;
}

.order-status-badge.is-processing {
  background-color: rgba(250, 170, 141, 0.25);
  color: #B25E3E;
}

.order-status-badge.is-cancelled {
  background-color: rgba(142, 133, 136, 0.15);
  color: #6B6366;
}

/* ---- Course mini card ---- */
.course-mini-card {
  background-color: #FFFFFF;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.course-mini-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -16px rgba(250, 170, 141, 0.5);
}

.course-mini-cover {
  height: 140px;
  position: relative;
  overflow: hidden;
}

.course-mini-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.08) 100%);
}

.course-progress-bar {
  width: 100%;
  height: 6px;
  background-color: #F8DBC0;
  border-radius: 9999px;
  overflow: hidden;
}

.course-progress-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #FF4000 0%, #FAAA8D 100%);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* ---- Settings row ---- */
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #F8DBC0;
}

.settings-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.settings-row:first-of-type {
  padding-top: 0;
}

.settings-row-label {
  flex: 1;
  min-width: 0;
}

/* ---- Toggle switch (iOS-style) ---- */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-switch-track {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background-color: #F2C5A5;
  border-radius: 9999px;
  transition: background-color 0.2s ease;
}

.toggle-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background-color: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.toggle-switch input[type="checkbox"]:checked ~ .toggle-switch-track {
  background-color: #FF4000;
}

.toggle-switch input[type="checkbox"]:checked ~ .toggle-switch-track .toggle-switch-thumb {
  transform: translateX(20px);
}

.toggle-switch input[type="checkbox"]:focus-visible ~ .toggle-switch-track {
  outline: 2px solid #FF4000;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .order-card,
  .course-mini-card,
  .course-progress-bar > div,
  .toggle-switch-track,
  .toggle-switch-thumb {
    transition: none !important;
  }
}


/* ---- Shared auth form primitives (duplicated from login.css: password tab reuses .auth-input / .password-toggle / .auth-error-msg) ---- */
/* Form input — pill style with focus ring */
.auth-input {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  font-size: 15px;
  color: #201E1F;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.auth-input::placeholder {
  color: #B8AFA6;
}

.auth-input.is-error {
  border-color: #FF4000 !important;
  background-color: rgba(255, 64, 0, 0.04);
}

.auth-input.is-error:focus {
  box-shadow: 0 0 0 3px rgba(255, 64, 0, 0.18) !important;
}

/* Show/hide password eye button */
.password-toggle {
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  background-color: rgba(255, 64, 0, 0.06);
}

/* Inline error message */
.auth-error-msg {
  display: flex;
  align-items: center;
  gap: 4px;
}
