/* ==========================================================================
   BOXD - Customer Account & Live Order Tracking Stylesheet
   Retro Pixel Aesthetic, Light Theme with Deep Purple & Black Borders
   ========================================================================== */

.account-layout {
  padding: 40px 0 80px;
  background-color: var(--bg-main);
  background-image: radial-gradient(#9333ea18 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  min-height: calc(100vh - 140px);
}

.account-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

/* --------------------------------------------------------------------------
   Left Side Navigation Panel
   -------------------------------------------------------------------------- */
.account-nav-panel {
  background: #ffffff;
  border: 2px solid #121214;
  box-shadow: 4px 4px 0px #121214;
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 96px;
}

.account-user-badge {
  text-align: center;
  padding-bottom: 20px;
  margin-bottom: 12px;
  border-bottom: 2px dashed #e2e8f0;
}

.account-avatar-circle {
  width: 76px;
  height: 76px;
  background: #9333ea;
  color: #ffffff;
  border: 2px solid #121214;
  box-shadow: 3px 3px 0px #121214;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  user-select: none;
}

.account-user-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 900;
  color: #121214;
  line-height: 1.2;
}

.account-user-email {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.account-pilot-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3e8ff;
  border: 1.5px solid #9333ea;
  color: #9333ea;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 4px;
  box-shadow: 1.5px 1.5px 0px #9333ea;
  margin-top: 8px;
}

.account-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ffffff;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

[dir="rtl"] .account-nav-btn {
  text-align: right;
}

.account-nav-btn:hover {
  background: #faf5ff;
  border: 2px solid #9333ea;
  box-shadow: 2px 2px 0px #9333ea;
  color: #121214;
  transform: translateX(2px);
}

[dir="rtl"] .account-nav-btn:hover {
  transform: translateX(-2px);
}

.account-nav-btn.active {
  background: #f3e8ff;
  border: 2px solid #121214;
  box-shadow: 3px 3px 0px #9333ea;
  color: #121214;
}

/* --------------------------------------------------------------------------
   Right Side Tab Content Box
   -------------------------------------------------------------------------- */
.account-tab-content {
  background: #ffffff;
  border: 2px solid #121214;
  box-shadow: 4px 4px 0px #121214;
  border-radius: var(--radius-sm);
  padding: 34px;
}

.account-tab-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 900;
  color: #121214;
  margin-bottom: 24px;
  border-bottom: 2px dashed #cbd5e1;
  padding-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Orders & Live Courier Stepper
   -------------------------------------------------------------------------- */
.order-history-card {
  background: #ffffff;
  border: 2px solid #121214;
  box-shadow: 3px 3px 0px #121214;
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.order-history-card:hover {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0px #9333ea;
}

.order-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px dashed #e2e8f0;
  padding-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.order-id-tag {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: #121214;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.order-tracking-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: #f3e8ff;
  border: 1.5px solid #9333ea;
  box-shadow: 2px 2px 0px #9333ea;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #9333ea;
}

/* Stepper Bar */
.tracking-stepper-wrap {
  position: relative;
  margin: 22px 0 16px;
  padding: 0 10px;
}

.stepper-progress-bar-bg {
  height: 8px;
  background: #f1f5f9;
  border: 1.5px solid #121214;
  border-radius: 4px;
  position: relative;
  margin-bottom: -16px;
  z-index: 1;
}

.stepper-progress-bar-fill {
  height: 100%;
  background: #9333ea;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.stepper-nodes-row {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.stepper-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.node-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #64748b;
  box-shadow: 1.5px 1.5px 0px #121214;
  transition: all 0.2s;
}

.stepper-node.active .node-dot,
.stepper-node.completed .node-dot {
  background: #9333ea;
  border-color: #121214;
  box-shadow: 2px 2px 0px #121214;
}

.node-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: #64748b;
  white-space: nowrap;
}

.stepper-node.active .node-label,
.stepper-node.completed .node-label {
  color: #121214;
  font-weight: 900;
}

/* Order Contents Breakdown */
.order-contents-box {
  background: #faf5ff;
  border: 1.5px solid #121214;
  box-shadow: 2px 2px 0px rgba(18, 18, 20, 0.1);
  border-radius: 4px;
  padding: 16px;
  margin: 14px 0;
}

.order-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.25rem;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(147, 51, 234, 0.2);
}

.order-item-row:last-child {
  border-bottom: none;
}

/* --------------------------------------------------------------------------
   Saved Delivery Addresses
   -------------------------------------------------------------------------- */
.address-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1.5px solid #121214;
  box-shadow: 2.5px 2.5px 0px #121214;
  border-radius: 4px;
  padding: 18px;
  margin-bottom: 14px;
  transition: all 0.15s ease;
  flex-wrap: wrap;
  gap: 12px;
}

.address-item-card:hover {
  transform: translateY(-1px);
  box-shadow: 4px 4px 0px #9333ea;
}

.address-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.address-full-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: #121214;
}

.address-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-default-addr {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: #10b981;
  background: #ecfdf5;
  border: 1.5px solid #10b981;
  box-shadow: 1px 1px 0px #10b981;
  padding: 2px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-set-default {
  padding: 6px 14px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  background: #ffffff;
  color: #9333ea;
  border: 1.5px solid #9333ea;
  box-shadow: 2px 2px 0px #9333ea;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.1s ease;
}

.btn-set-default:hover {
  background: #9333ea;
  color: #ffffff;
  box-shadow: 3px 3px 0px #121214;
}

.btn-delete-addr {
  color: #f43f5e;
  background: #fff1f2;
  border: 1.5px solid #f43f5e;
  box-shadow: 1.5px 1.5px 0px #f43f5e;
  border-radius: 4px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.1s ease;
}

.btn-delete-addr:hover {
  background: #f43f5e;
  color: #ffffff;
  box-shadow: 2.5px 2.5px 0px #121214;
}

/* Add Address Form */
.add-address-card {
  background: #faf5ff;
  border: 2px solid #121214;
  box-shadow: 3px 3px 0px #121214;
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-top: 16px;
}

.add-address-title {
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 12px;
}

/* --------------------------------------------------------------------------
   Profile Settings Form
   -------------------------------------------------------------------------- */
.profile-form-wrap {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #10b981;
  background: #ecfdf5;
  border: 1px solid #10b981;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 8px;
}

[dir="rtl"] .profile-readonly-badge {
  margin-left: 0;
  margin-right: 8px;
}

/* RTL Typography & Alignment (Matches English Visual Scale) */
[dir="rtl"] .account-tab-title {
  flex-direction: row;
  font-family: var(--font-ar), 'Changa', sans-serif !important;
  font-size: 1.4rem;
  letter-spacing: 0px !important;
}

[dir="rtl"] .account-user-name {
  font-family: var(--font-ar), 'Changa', sans-serif !important;
  font-size: 1.25rem;
  letter-spacing: 0px !important;
}

[dir="rtl"] .account-user-email {
  font-size: 0.92rem;
}

[dir="rtl"] .account-pilot-tag {
  font-size: 0.8rem;
}

[dir="rtl"] .account-nav-btn {
  font-size: 0.95rem;
}

[dir="rtl"] .order-id-tag {
  font-family: var(--font-ar), 'Changa', sans-serif !important;
  font-size: 1.15rem;
  letter-spacing: 0px !important;
}

[dir="rtl"] .order-tracking-tag {
  font-size: 0.95rem;
}

[dir="rtl"] .node-label {
  font-family: var(--font-ar), 'Changa', sans-serif !important;
  font-size: 0.82rem;
  letter-spacing: 0px !important;
}

[dir="rtl"] .order-contents-box h5 {
  font-size: 1.05rem;
}

[dir="rtl"] .order-item-row {
  font-size: 0.95rem;
}

[dir="rtl"] .address-full-text {
  font-size: 0.95rem;
}

[dir="rtl"] .badge-default-addr {
  font-size: 0.82rem;
}

[dir="rtl"] .btn-set-default {
  font-family: var(--font-ar), 'Changa', sans-serif !important;
  font-size: 0.88rem;
  letter-spacing: 0px !important;
}

[dir="rtl"] .add-address-card h4,
[dir="rtl"] .add-address-title {
  font-size: 1.15rem;
}

[dir="rtl"] .profile-readonly-badge {
  font-size: 0.8rem;
}

@media (max-width: 840px) {
  .account-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .account-nav-panel {
    position: static;
  }
  .account-tab-content {
    padding: 24px 18px;
  }
}

@media (max-width: 640px) {
  .account-layout {
    padding: 20px 0 60px;
  }
  .account-nav-panel {
    padding: 18px 14px;
  }
  .account-avatar-circle {
    width: 64px;
    height: 64px;
    font-size: 1.8rem;
    margin-bottom: 8px;
  }
  .account-user-name {
    font-size: 1.35rem;
  }
  .account-nav-btn {
    padding: 10px 12px;
    font-size: 1.15rem;
  }
  .account-tab-content {
    padding: 18px 14px;
  }
  .order-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .order-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .node-label {
    font-size: 0.85rem;
  }
  .address-item-card {
    padding: 14px;
  }
}
