/* ============================================================
   ORDER PAGE — FIGMA DESIGN SYSTEM
   Extracted from Figma file: r5cBGesoUI4bMVn8GYyfVY / node 4-2
   Generated: 2026-05-23
   ============================================================ */

/* ── CSS Custom Properties (Design Tokens) ── */
:root {
  /* ── Colors ── */
  --color-primary:          #7b28e2;
  --color-primary-dark:     #6320b8;
  --color-primary-light:    #f2eafc;
  --color-primary-xlight:   #f8f5ff;

  --color-text-dark:        #131722;
  --color-text-body:        #374151;
  --color-text-muted:       #616674;
  --color-text-faint:       #9ca3af;
  --color-text-link:        #7b28e2;

  --color-border:           #f1f2f4;
  --color-border-medium:    #e5e7eb;

  --color-bg-page:          #f9f8f6;
  --color-bg-white:         #ffffff;
  --color-bg-faint:         #fafafa;
  --color-bg-input:         #f8f8f8;
  --color-bg-input-border:  #f0f0f0;

  /* Balance card backgrounds */
  --color-bg-orange:        #fff1ec;
  --color-bg-green:         #eaf8ec;
  --color-bg-purple:        #faf0f7;

  /* Semantic colors */
  --color-orange:           #ea580c;
  --color-green:            #16a34a;
  --color-red:              #e53935;
  --color-amber:            #f59e0b;
  --color-gray-muted:       #6b7280;

  /* Guest banner gradient */
  --gradient-guest:         linear-gradient(120deg, #f8f5ff 0%, #f0ebff 40%, #fdf4ff 70%, #fff5fb 100%);
  --color-guest-border:     #e9d5ff;

  /* ── Typography ── */
  --font-ui:                'Quicksand', sans-serif;
  --font-body:              -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-xs:                11px;
  --text-sm:                12px;
  --text-base:              13px;
  --text-md:                14px;
  --text-lg:                15px;
  --text-xl:                17px;
  --text-2xl:               20px;
  --text-3xl:               26px;

  /* ── Spacing scale ── */
  --space-1:                4px;
  --space-2:                8px;
  --space-3:                10px;
  --space-4:                12px;
  --space-5:                14px;
  --space-6:                16px;
  --space-7:                18px;
  --space-8:                20px;
  --space-9:                22px;
  --space-10:               24px;
  --space-12:               28px;
  --space-14:               36px;

  /* ── Border radii ── */
  --radius-sm:              6px;
  --radius-md:              10px;
  --radius-lg:              12px;
  --radius-xl:              14px;
  --radius-pill:            9999px;

  /* ── Shadows ── */
  --shadow-card:            0 2px 12px rgba(0,0,0,.07);
  --shadow-bubble:          0 2px 10px rgba(0,0,0,.06);
  --shadow-dropdown:        0 8px 32px rgba(0,0,0,.13);

  /* ── Layout ── */
  --page-max-width:         1280px;
  --nav-height:             64px;
  --sidebar-width:          280px;
  --service-panel-width:    360px;
  --gap-page:               24px;
  --gap-panels:             20px;
}

/* ============================================================
   GLOBAL PAGE LAYOUT
   ============================================================ */
.order-page-wrap {
  padding-top: var(--nav-height);
  background: var(--color-bg-page);
  min-height: 100vh;
}

.order-page-inner {
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: var(--space-10) 20px;
  display: flex;
  gap: var(--gap-page);
  align-items: flex-start;
}

@media (max-width: 991px) {
  .order-page-inner {
    flex-direction: column;
    padding: var(--space-8) 16px;
  }
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.order-sidebar-wrap {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .order-sidebar-wrap { width: 100%; }
}

/* Breadcrumb above sidebar */
.sidebar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-faint);
  margin-bottom: 14px;
}

.sidebar-breadcrumb a {
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color .15s;
}

.sidebar-breadcrumb a:hover { color: var(--color-primary); }

.sidebar-breadcrumb .sep {
  font-size: 12px;
  color: var(--color-text-faint);
}

.sidebar-breadcrumb .current {
  color: var(--color-text-body);
  font-weight: 700;
}

.sidebar-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border-medium);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 6px 0;
}

.sidebar-card::-webkit-scrollbar { width: 4px; }
.sidebar-card::-webkit-scrollbar-track { background: transparent; }
.sidebar-card::-webkit-scrollbar-thumb { background: var(--color-border-medium); border-radius: 4px; }

/* Social platform icon in sidebar header */
.sidebar-platform-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Platform accordion row — rounded active highlight, no dividers */
.platform-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  margin: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}

.platform-header:hover { background: #f3f4f6; }
.platform-header.active { background: var(--color-primary-light); }

.platform-header .platform-name {
  flex: 1;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-dark);
  line-height: 1.3;
}

.platform-header.active .platform-name { color: var(--color-primary); }

.platform-header .chevron {
  transition: transform .2s;
  color: var(--color-text-faint);
  font-size: 18px;
  flex-shrink: 0;
}

.platform-header.active .chevron {
  transform: rotate(180deg);
  color: var(--color-primary);
}

/* Sub-category list */
.subcats-list {
  display: none;
  background: var(--color-bg-white);
  padding: 4px 8px 8px 14px; /* 14px left creates indent space for the bar */
}

.subcats-list.open { display: block; }

.subcat-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border-left: 3px solid transparent;
  /* straight left, rounded right — so border-left stays a clean straight bar */
  border-radius: 0 12px 12px 0;
  transition: background .12s, border-color .12s, color .12s;
  line-height: 1.4;
  min-height: 40px;
}

.subcat-item:hover {
  background: #f5f5f5;
  color: var(--color-text-dark);
  text-decoration: none;
}

.subcat-item.active {
  background: #f3f4f6;
  border-left-color: #131722; /* dark straight bar — matches Figma */
  color: var(--color-text-dark);
  font-weight: 700;
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.order-main-wrap {
  flex: 1;
  min-width: 0;
}

/* ── Breadcrumb ── */
.order-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-base);
  color: var(--color-text-faint);
  margin-bottom: 18px;
}

.order-breadcrumb a {
  color: var(--color-text-faint);
  text-decoration: none;
  transition: color .15s;
}

.order-breadcrumb a:hover { color: var(--color-primary); }
.order-breadcrumb .sep { font-size: 11px; }
.order-breadcrumb .current { color: var(--color-text-body); font-weight: 600; }

/* ── User Info Section ── */
.user-info-section {
  background: #ffffff;
  border-radius: 32px;
  border: 1px solid #E2E3E8;
  padding: 24px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Guest mode variant */
.user-info-section.guest-mode {
  background: var(--gradient-guest);
  border: 1px solid var(--color-guest-border);
  padding: 0 var(--space-10) 0 0;
  overflow: visible;
  position: relative;
}

/* User info header row */
.user-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info-avatar-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.user-info-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border-medium);
  flex-shrink: 0;
}

.user-info-name {
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-dark);
  line-height: 1.3;
}

.user-info-rank {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
  margin-top: 2px;
}

/* Top-up button */
.btn-napien-order {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .15s;
}

.btn-napien-order:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* Balance cards */
.user-balance-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .user-balance-cards { grid-template-columns: 1fr 1fr; }
}

.balance-card {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border-left: 3px solid transparent;
}

.balance-card-orange { border-left-color: var(--color-orange); }
.balance-card-green  { border-left-color: var(--color-green); }
.balance-card-purple { border-left-color: var(--color-primary); }

.balance-card-orange { background: var(--color-bg-orange); }
.balance-card-green  { background: var(--color-bg-green); }
.balance-card-purple { background: var(--color-bg-purple); }

.balance-label {
  font-size: 12px;
  color: var(--color-gray-muted);
  font-weight: 500;
  margin-bottom: 6px;
}

.balance-value {
  font-family: var(--font-ui);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
}

.balance-value.orange { color: var(--color-orange); }
.balance-value.green  { color: var(--color-green); }
.balance-value.purple { color: var(--color-primary); }

/* Rank progress */
.rank-progress-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rank-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rank-progress-need {
  font-size: 13px;
  color: var(--color-text-body);
  font-weight: 500;
}

.rank-progress-next {
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 600;
  white-space: nowrap;
}

/* ── Guest Banner Inner ── */
.guest-banner-inner {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: visible;
  position: relative;
  min-height: 170px;
}

.guest-mascot-wrap {
  flex-shrink: 0;
  margin-left: 0;
  margin-bottom: -20px;
  align-self: flex-end;
}

.guest-mascot-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  display: block;
}

.guest-speech-wrap {
  flex: 1;
  margin-left: 12px;
  padding: var(--space-8) 0;
}

.guest-speech-bubble {
  background: var(--color-bg-white);
  border-radius: var(--radius-xl);
  padding: 12px 16px;
  box-shadow: var(--shadow-bubble);
  position: relative;
  display: inline-block;
  max-width: 400px;
}

/* Left-pointing tail */
.guest-speech-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 22px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid var(--color-bg-white);
  filter: drop-shadow(-2px 0 2px rgba(0,0,0,.04));
}

.guest-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0 0 4px;
  line-height: 1.3;
}

.guest-subtitle {
  font-size: 12px;
  color: var(--color-gray-muted);
  margin: 0;
  line-height: 1.55;
}

/* Guest CTA buttons (unused in banner — kept for potential reuse) */
.guest-cta-wrap {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
  align-items: center;
}

.btn-guest-login {
  height: 42px;
  padding: 0 22px;
  background: var(--color-text-dark);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, transform .15s;
  border: none;
}

.btn-guest-login:hover {
  background: #2a3142;
  color: #fff;
  transform: translateY(-1px);
}

.btn-guest-register {
  height: 42px;
  padding: 0 22px;
  border: 1.5px solid var(--color-border-medium);
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-text-body);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  background: var(--color-bg-white);
  white-space: nowrap;
  transition: border-color .2s, background .2s, transform .15s;
}

.btn-guest-register:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-xlight);
  transform: translateY(-1px);
}

/* Decorative SVG arrow — fixed, JS refines position to align with navbar login button */
.guest-deco-arrow {
  position: fixed;
  top: 70px;        /* fallback: just below navbar */
  right: 120px;     /* fallback: near login button */
  width: 114px;
  height: 133px;
  pointer-events: none;
  z-index: 45;
}

@media (max-width: 768px) {
  .guest-banner-inner { flex-wrap: wrap; padding: 16px; }
  .guest-mascot-wrap { order: 1; margin: 0 auto; }
  .guest-speech-wrap { order: 2; width: 100%; margin: 0; padding: 12px 0 4px; }
  .guest-speech-bubble::before { display: none; }
  .guest-deco-arrow { display: none; }
}

/* ============================================================
   ORDER CONTENT ROW — unified single card
   ============================================================ */
.order-content-row {
  display: flex;
  align-items: flex-start;
  background: #ffffff;
  border-radius: 32px;
  border: 1px solid #E2E3E8;
  overflow: clip;
}

@media (max-width: 991px) {
  .order-content-row { flex-direction: column; }
}

/* ── Left: Form panel ── */
.order-form-panel {
  flex: 1;
  min-width: 0;
  background: transparent;
  padding: var(--space-10);
}

@media (max-width: 991px) {
  .order-form-panel { border-bottom: 1px solid #E2E3E8; }
}

.order-form-title {
  font-family: var(--font-ui);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0 0 20px;
  line-height: 1.3;
}

/* ── Right: Service panel ── */
.order-service-panel {
  width: var(--service-panel-width);
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-height) + 20px);
  align-self: flex-start;
}

@media (max-width: 991px) {
  .order-service-panel { width: 100%; position: static; }
}

.service-details-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  border: none;
  padding: var(--space-9);
}

/* Service name header within card */
.svc-card-label {
  font-size: 11px;
  color: var(--color-text-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 5px;
}

.svc-card-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-dark);
  margin: 0;
  line-height: 1.4;
}

/* Metric rows */
.svc-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.svc-metric-label {
  font-size: var(--text-base);
  color: var(--color-gray-muted);
  font-weight: 500;
}

.svc-metric-value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text-dark);
}

/* Total price display */
.svc-total-price-label {
  font-size: 14px;
  color: var(--color-text-body);
  font-weight: 600;
}

.svc-total-price-value {
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text-dark);
}

/* ── Service info card (white box inside panel) ── */
.svc-loading-state {
  text-align: center;
  padding: 40px 0 20px;
}

.svc-info-card {
  background: #F8F9FA;
  border: 1px solid #F1F2F4;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.svc-info-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.svc-platform-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.svc-info-name {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-dark);
  line-height: 1.35;
}

.svc-metrics-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.svc-metric-id {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-dark);
}

.svc-metric-muted {
  font-size: 13px;
  color: var(--color-text-faint);
  font-weight: 500;
}

.svc-metric-bold {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-dark);
}

/* ── Submit / Launch button ── */
.btn-launch-service {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  background: var(--color-primary);
  color: #fff !important;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: 700;
  cursor: pointer;
  gap: var(--space-2);
  margin-bottom: 12px;
  transition: background .2s, transform .15s;
  text-decoration: none;
}

.btn-launch-service:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-launch-service:active { transform: none; }

/* Order disclaimer */
.order-disclaimer {
  font-size: 11.5px;
  color: var(--color-text-faint);
  text-align: center;
  margin: 0;
  line-height: 1.5;
}

.order-disclaimer a {
  color: var(--color-primary) !important;
  text-decoration: none;
}

.order-disclaimer a:hover { text-decoration: underline; }

/* ============================================================
   FORM ELEMENTS (enhanced — Figma-accurate)
   ============================================================ */
.form-container { position: relative; }

/* Form labels */
.order-form-panel .form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-body);
  margin-bottom: 8px;
}

/* Base input / select height + border */
.order-form-panel .form-control,
.order-form-panel .form-select {
  height: 44px;
  border-radius: var(--radius-md) !important;
  border: 1.5px solid var(--color-border-medium) !important;
  background: #fff !important;
  font-size: 14px;
  color: var(--color-text-dark);
  padding: 0 14px;
  transition: border-color .15s, box-shadow .15s;
}

.order-form-panel .form-control:focus,
.order-form-panel .form-select:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(123,40,226,.1) !important;
  outline: none;
}

.order-form-panel textarea.form-control {
  height: auto;
  padding: 12px 14px;
}

/* Link input-group: full-width input + "Dán" pill */
.order-form-panel .input-group > .form-control {
  border-right: none !important;
  border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
  flex: 1;
}

.order-form-panel .input-group > .btn-outline-secondary,
.order-form-panel .input-group > .input-group-text {
  height: 44px;
  border: 1.5px solid var(--color-border-medium) !important;
  border-left: none !important;
  border-radius: 0 var(--radius-md) var(--radius-md) 0 !important;
  background: #f9f8f6 !important;
  color: var(--color-text-body) !important;
  font-size: 13px;
  font-weight: 600;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s;
  box-shadow: none !important;
}

.order-form-panel .input-group > .btn-outline-secondary:hover {
  background: #ede9fe !important;
  color: var(--color-primary) !important;
}

/* ── Quantity stepper: input on left, [-][+] on right ── */
.qty-row {
  display: flex;
  align-items: stretch;
  height: 48px;
  border: 1.5px solid var(--color-border-medium);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.qty-input {
  flex: 1;
  border: none !important;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-dark);
  background: #fff;
  padding: 0 14px;
  outline: none;
  box-shadow: none !important;
  min-width: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

/* Button group on the right */
.qty-btns {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  border-left: 1.5px solid var(--color-border-medium);
}

.qty-btn {
  width: 44px;
  background: #f9f8f6;
  border: none;
  font-size: 20px;
  font-weight: 300;
  color: var(--color-text-body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  outline: none;
  padding: 0;
  line-height: 1;
  user-select: none;
}

.qty-btn:hover { background: #ede9fe; color: var(--color-primary); }
.qty-btn:active { background: #ddd6fe; }
.qty-btn-inc { border-left: 1.5px solid var(--color-border-medium); }

/* Quantity hint line */
.qty-hint {
  font-size: 12px;
  color: var(--color-text-faint);
  margin-top: 7px;
}

.qty-hint .qty-min,
.qty-hint .qty-max {
  color: var(--color-orange);
  font-weight: 700;
}

/* Hide "Loại dịch vụ" row — not in Figma design */
#serviceTypeRow { display: none !important; }

/* ── Service panel total row (plain, no highlight box) ── */
.svc-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  margin-bottom: 4px;
}

.form-loader {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(6px);
  border-radius: var(--radius-xl);
}

.form-loader .spinner-border {
  width: 3rem;
  height: 3rem;
  color: var(--color-primary);
}

.form-loader .loading-text {
  margin-top: 1rem;
  font-weight: 500;
  font-size: .95rem;
  color: var(--color-text-body);
  text-align: center;
}

/* Search input */
.order-search-wrap {
  position: relative;
}

.order-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--color-text-faint);
  pointer-events: none;
  z-index: 1;
}

.order-search-input {
  background: var(--color-bg-input);
  border-color: var(--color-bg-input-border);
  border-radius: var(--radius-md);
  padding-left: 40px;
  height: 44px;
}

.order-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(123,40,226,.1);
  background: #fff;
}

/* ============================================================
   SELECT2 CUSTOM STYLING
   ============================================================ */
.select2-container--default .select2-selection--single {
  height: 44px !important;
  padding: 4px 12px;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-border-medium) !important;
  border-radius: var(--radius-md) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 44px !important;
  font-size: 14px;
  padding-left: 0;
  display: flex;
  align-items: center;
  color: var(--color-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Constrain icons inside Select2 selection + dropdown */
.select2-selection__rendered img,
.select2-results__option img {
  width: 20px !important;
  height: 20px !important;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
  margin-right: 8px;
  vertical-align: middle;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px !important;
  right: 6px;
}

.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(123,40,226,.1);
}

.select2-dropdown {
  border: 1px solid var(--color-border-medium);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.select2-search--dropdown { padding: 8px; }

.select2-search--dropdown .select2-search__field {
  padding: 6px;
  border-radius: 6px;
  border-color: var(--color-border-medium);
  font-size: 13px;
}

.select2-results__option {
  padding: 0 8px !important;
  margin: 0 !important;
  color: var(--color-text-dark) !important;
  font-size: 14px;
}

.select2-results__option--highlighted[aria-selected] {
  background-color: var(--color-primary-light) !important;
  color: var(--color-primary) !important;
}

.select2-results__option[aria-selected="true"] {
  background-color: var(--color-primary-light) !important;
  color: var(--color-primary) !important;
  font-weight: 600;
}

.quick-service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px;
  font-size: 15px;
}

/* ── Fix: search box — hide dropdown arrow, push text past icon ── */
.order-search-wrap .select2-container--default .select2-selection--single {
  background: var(--color-bg-input) !important;
  border-color: var(--color-bg-input-border) !important;
  border-radius: var(--radius-md) !important;
}

.order-search-wrap .select2-container--default .select2-selection--single .select2-selection__rendered,
.order-search-wrap .select2-container--default .select2-selection--single .select2-selection__placeholder {
  padding-left: 28px !important;
  color: var(--color-text-faint) !important;
}

/* Hide the dropdown arrow on the search input — looks like a plain text input */
.order-search-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none !important;
}

/* ── Fix: service option container fills selection width so price aligns right ── */
.select2-selection__rendered .service-option-container {
  width: 100%;
  min-width: 0;
}

.select2-selection__rendered .service-option-content {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.select2-selection__rendered .service-option-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-primary-figma { color: var(--color-primary) !important; }
.bg-primary-figma   { background: var(--color-primary) !important; }
.font-ui            { font-family: var(--font-ui) !important; }

/* ============================================================
   DARK MODE SUPPORT
   ============================================================ */
[data-bs-theme="dark"] .form-loader {
  background: rgba(33,37,41,.95);
}

[data-bs-theme="dark"] .form-loader .loading-text { color: #fff; }

[data-bs-theme="dark"] .order-form-panel,
[data-bs-theme="dark"] .service-details-card,
[data-bs-theme="dark"] .sidebar-card,
[data-bs-theme="dark"] .user-info-section {
  background: #1e2233;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}

[data-bs-theme="dark"] .order-page-wrap {
  background: #161928;
}

[data-bs-theme="dark"] .platform-header:hover { background: rgba(255,255,255,.04); }
[data-bs-theme="dark"] .platform-header.active { background: rgba(123,40,226,.15); }
[data-bs-theme="dark"] .subcat-item { color: #9ca3af; }
[data-bs-theme="dark"] .subcat-item.active { background: rgba(123,40,226,.12); color: #e9d5ff; }
[data-bs-theme="dark"] .subcat-item:hover { background: rgba(123,40,226,.08); color: #c084fc; }

/* ============================================================
   SCHEDULE INPUT
   ============================================================ */
.schedule-input-wrap {
  position: relative;
}

.schedule-time-input {
  padding-right: 44px !important;
  border-radius: var(--radius-md) !important;
  border: 1.5px solid var(--color-border-medium) !important;
  height: 44px;
  font-size: 14px;
  cursor: pointer;
  background: #fff !important;
}

.schedule-time-input:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(123,40,226,.1) !important;
}

.schedule-input-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-faint);
  font-size: 18px;
  pointer-events: none;
}

/* ============================================================
   FLATPICKR REDESIGN — light theme, purple accent
   ============================================================ */
.flatpickr-calendar {
  background: #ffffff !important;
  border-radius: 16px !important;
  border: 1px solid #E2E3E8 !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.12) !important;
  font-family: var(--font-body);
  width: 308px !important;
  padding: 4px;
}

/* Remove arrow tip */
.flatpickr-calendar.arrowTop::before,
.flatpickr-calendar.arrowTop::after,
.flatpickr-calendar.arrowBottom::before,
.flatpickr-calendar.arrowBottom::after { display: none !important; }

/* Month header */
.flatpickr-months {
  background: transparent !important;
  padding: 8px 4px 0;
  align-items: center;
}

.flatpickr-month {
  background: transparent !important;
  color: var(--color-text-dark) !important;
  fill: var(--color-text-dark) !important;
  height: 38px !important;
}

.flatpickr-current-month {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--color-text-dark) !important;
  padding-top: 6px !important;
}

.flatpickr-current-month .cur-month {
  font-weight: 700 !important;
  color: var(--color-text-dark) !important;
}

.flatpickr-current-month .numInputWrapper input {
  color: var(--color-text-dark) !important;
  font-weight: 700 !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  fill: var(--color-text-dark) !important;
  color: var(--color-text-dark) !important;
  padding: 8px !important;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg { fill: var(--color-primary) !important; }

/* Weekday labels */
.flatpickr-weekdays { background: transparent !important; }

span.flatpickr-weekday {
  background: transparent !important;
  color: var(--color-text-faint) !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}

/* Days grid */
.flatpickr-days { border: none !important; width: 100% !important; }
.dayContainer { width: 100% !important; min-width: 100% !important; max-width: 100% !important; }

.flatpickr-day {
  color: var(--color-text-dark) !important;
  border-radius: 50% !important;
  font-size: 13px !important;
  height: 36px !important;
  width: 36px !important;
  max-width: 36px !important;
  line-height: 36px !important;
  border: none !important;
}

.flatpickr-day:hover:not(.selected):not(.disabled) {
  background: var(--color-primary-light) !important;
  color: var(--color-primary) !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: #fff !important;
}

.flatpickr-day.today:not(.selected) {
  border: 1.5px solid var(--color-primary) !important;
  color: var(--color-primary) !important;
  font-weight: 700;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay { color: #d1d5db !important; }

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
  color: #e5e7eb !important;
  background: transparent !important;
}

/* Time section */
.flatpickr-time {
  background: transparent !important;
  border-top: 1px solid #f1f2f4 !important;
  height: auto !important;
  padding: 10px 8px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.fp-time-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-body);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: auto;
  white-space: nowrap;
}

.flatpickr-time .numInputWrapper {
  width: 52px !important;
  flex: none !important;
}

.flatpickr-time input.flatpickr-hour,
.flatpickr-time input.flatpickr-minute {
  background: #f3f4f6 !important;
  border: none !important;
  border-radius: 8px !important;
  color: var(--color-text-dark) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  height: 36px !important;
  padding: 0 !important;
  text-align: center !important;
}

.flatpickr-time input.flatpickr-hour:focus,
.flatpickr-time input.flatpickr-minute:focus {
  background: var(--color-primary-light) !important;
  outline: none !important;
}

.flatpickr-time .flatpickr-time-separator {
  color: var(--color-text-dark) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  line-height: 36px;
}

.flatpickr-time .numInputWrapper span { display: none !important; }
