/* Consignment Booking Form Styling - Yatish Transport Pty Ltd */
:root {
  --theme-primary: #33a0e1;
  --theme-primary-hover: #1b8cd2;
  --theme-navy: #0b3762;
  --theme-navy-dark: #072543;
  --theme-dark: #231c48;
  --theme-border: #cbdde9;
  --theme-border-focus: #33a0e1;
  --theme-bg: #f4f8fc;
  --theme-text-dark: #1e293b;
  --theme-text-muted: #64748b;
  --theme-danger: #ef4444;
  --theme-danger-dark: #dc2626;
  --theme-success: #10b981;
  --theme-warning: #f59e0b;
  --field-height: 42px;
}

.consignment-wrapper {
  background-color: #f5f8fc;
  padding: 28px 0 60px 0;
  font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--theme-text-dark);
}

/* ================================================================
   TOP BRAND / INFO HERO CARD
   ================================================================ */
.consignment-header-banner {
  background: linear-gradient(135deg, #0b3762 0%, #164e85 60%, #231c48 100%);
  border-radius: 12px;
  padding: 20px 28px;
  margin-bottom: 24px;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(11, 55, 98, 0.16);
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--theme-primary);
}

.consignment-header-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(51, 160, 225, 0.1);
  pointer-events: none;
}

.consignment-header-banner .banner-title {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.consignment-header-banner .banner-desc {
  font-size: 13.5px;
  color: #cde4fa;
  margin-bottom: 0;
}

.consignment-header-banner .badge-pill-ref {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.consignment-header-banner .badge-pill-ref strong {
  color: var(--theme-primary);
  background: #ffffff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

/* ================================================================
   STEP NAVIGATION BAR
   ================================================================ */
.consignment-steps-bar {
  background: #ffffff;
  border: 1px solid #d4e3f0;
  border-radius: 10px;
  padding: 12px 20px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(11, 55, 98, 0.04);
}

.steps-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-node {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--theme-text-muted);
  font-size: 13px;
  font-weight: 600;
}

.step-node.active {
  color: var(--theme-navy);
}

.step-node.active .step-num {
  background: var(--theme-primary);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(51, 160, 225, 0.25);
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.step-connector {
  flex-grow: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 14px;
}

/* ================================================================
   CARDS & SECTIONS
   ================================================================ */
.cs-card {
  background: #ffffff;
  border: 1.5px solid #d4e3f0;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(11, 55, 98, 0.04);
  margin-bottom: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100% - 20px);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cs-card:hover {
  box-shadow: 0 6px 18px rgba(11, 55, 98, 0.07);
}

.cs-card-header {
  background: linear-gradient(135deg, #0b3762 0%, #174271 100%);
  color: #ffffff;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: 0.2px;
  border-top: 3px solid var(--theme-primary);
}

.cs-card-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-card-header-title i {
  color: var(--theme-primary);
  font-size: 15px;
}

.cs-card-body {
  padding: 18px 18px;
  flex-grow: 1;
  background: #ffffff;
}

/* Labels */
.cs-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 5px;
  display: block;
}

.cs-req {
  color: var(--theme-danger);
  font-weight: 700;
  margin-left: 2px;
}

/* ================================================================
   EXACT SAME HEIGHT: INPUTS, SELECTS AND SELECT2
   ================================================================ */
.form-control:not(textarea),
.form-select,
.select2-container .select2-selection--single {
  height: var(--field-height) !important;
  min-height: var(--field-height) !important;
  max-height: var(--field-height) !important;
  line-height: calc(var(--field-height) - 4px) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  border: 1.5px solid var(--theme-border) !important;
  border-radius: 7px !important;
  color: var(--theme-text-dark) !important;
  background-color: #ffffff !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.form-control:not(textarea) {
  padding: 0 14px !important;
}

.form-select {
  padding: 0 34px 0 14px !important;
  background-position: right 12px center !important;
}

.form-control::placeholder {
  color: #94a3b8 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

/* Date and Time Pickers */
input[type="date"].form-control,
input[type="time"].form-control {
  display: flex;
  align-items: center;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: calc(var(--field-height) - 4px) !important;
}

/* Focus States */
.form-control:focus,
.form-select:focus,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 3.5px rgba(51, 160, 225, 0.22) !important;
  outline: none !important;
}

/* Textarea override */
textarea.form-control,
textarea.cs-textarea {
  height: auto !important;
  min-height: 80px !important;
  line-height: 1.5 !important;
  padding: 10px 14px !important;
  font-size: 13px !important;
  resize: vertical;
}

/* ================================================================
   SELECT2 STYLING & THEMING (CUSTOM YATISH TRANSPORT THEME)
   ================================================================ */
.select2-container {
  width: 100% !important;
  box-sizing: border-box !important;
}

.select2-container .select2-selection--single {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
  padding: 0 !important;
  background-color: #ffffff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: calc(var(--field-height) - 4px) !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  padding-left: 14px !important;
  padding-right: 36px !important;
  color: var(--theme-text-dark) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
}

/* Sleek rotating chevron arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  top: 0 !important;
  right: 12px !important;
  width: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border: none !important;
  width: 8px !important;
  height: 8px !important;
  border-right: 2px solid var(--theme-navy) !important;
  border-bottom: 2px solid var(--theme-navy) !important;
  transform: rotate(45deg) !important;
  transition: transform 0.25s ease, border-color 0.2s ease !important;
  display: inline-block !important;
  position: static !important;
  margin: 0 !important;
  top: auto !important;
  left: auto !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-right: 2px solid var(--theme-primary) !important;
  border-bottom: 2px solid var(--theme-primary) !important;
  transform: rotate(-135deg) translateY(-2px) !important;
}

/* Dropdown Container */
.select2-dropdown {
  border: 1.5px solid var(--theme-primary) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 32px rgba(11, 55, 98, 0.16) !important;
  overflow: hidden !important;
  z-index: 99999 !important;
  background: #ffffff !important;
  margin-top: 2px !important;
}

/* Search Box inside Dropdown */
.select2-search--dropdown {
  padding: 8px 10px !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.select2-search--dropdown .select2-search__field {
  height: 36px !important;
  line-height: 34px !important;
  padding: 0 12px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  color: var(--theme-text-dark) !important;
  background: #ffffff !important;
  outline: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.select2-search--dropdown .select2-search__field:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 2.5px rgba(51, 160, 225, 0.2) !important;
}

/* Results List */
.select2-results__options {
  max-height: 250px !important;
  padding: 5px !important;
}

.select2-results__group {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  color: #0b3762 !important;
  background: #f1f6fb !important;
  padding: 6px 12px !important;
  border-radius: 4px !important;
  margin-top: 4px !important;
  margin-bottom: 2px !important;
}

.select2-results__option {
  font-size: 13px !important;
  padding: 9px 12px !important;
  color: var(--theme-text-dark) !important;
  border-radius: 5px !important;
  margin-bottom: 2px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: linear-gradient(135deg, #0b3762 0%, #175087 100%) !important;
  color: #ffffff !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
  background-color: #ebf5ff !important;
  color: var(--theme-navy) !important;
  font-weight: 700 !important;
}

/* Ensure hidden original select element stays hidden without Bootstrap interference */
.select2-hidden-accessible {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ================================================================
   REQUIREMENTS CHECKLIST
   ================================================================ */
.cs-checklist {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: #f8fafc;
  padding: 10px 14px;
  border: 1.5px solid #dbe6f0;
  border-radius: 6px;
}

.cs-checkbox-label {
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--theme-primary);
  cursor: pointer;
}

/* Radio Group */
.cs-radio-group {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 6px;
  height: var(--field-height);
}

.cs-radio-label {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0;
}

.cs-radio-label input[type="radio"] {
  accent-color: var(--theme-navy);
  width: 16px;
  height: 16px;
}

/* ================================================================
   FREIGHT TABLE
   ================================================================ */
.freight-table-responsive {
  border: 1.5px solid #cfdce8;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(11, 55, 98, 0.03);
}

.freight-table {
  width: 100%;
  margin-bottom: 0;
  font-size: 12px;
  vertical-align: middle;
}

.freight-table thead th {
  background-color: #0b3762;
  color: #ffffff;
  font-weight: 600;
  padding: 9px 8px;
  border: none;
  text-align: center;
  white-space: nowrap;
  font-size: 12px;
}

.freight-table tbody td {
  padding: 7px 6px;
  border-bottom: 1px solid #e2eaf1;
  text-align: center;
  background: #ffffff;
}

.freight-table tbody tr:nth-child(even) td {
  background: #f9fbfd;
}

.freight-table tbody tr:hover td {
  background: #f1f7fc;
}

.freight-table .form-control,
.freight-table .form-select {
  height: 34px !important;
  min-height: 34px !important;
  max-height: 34px !important;
  line-height: 32px !important;
  font-size: 12px !important;
  /* padding: 0 6px !important; */
  border-radius: 4px !important;
  text-align: center;
}

.freight-table .desc-input {
  text-align: left !important;
  padding-left: 10px !important;
}

.btn-remove-row {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove-row:hover {
  background: #dc2626;
  color: #ffffff;
}

.btn-add-goods {
  background: linear-gradient(135deg, var(--theme-primary) 0%, #1670bf 100%);
  color: #ffffff;
  border: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(51, 160, 225, 0.25);
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.btn-add-goods:hover {
  background: var(--theme-navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 55, 98, 0.25);
  color: #ffffff;
}

/* ================================================================
   FILE ATTACHMENT CARD
   ================================================================ */
.file-upload-box {
  background: #f8fafc;
  border: 2px dashed #a5c7eb;
  border-radius: 8px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.file-upload-box:hover {
  background: #eff6ff;
  border-color: var(--theme-primary);
}

.file-upload-btn-styled {
  background: linear-gradient(135deg, var(--theme-primary) 0%, #0d6efd 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(51, 160, 225, 0.25);
}

.file-hint-text {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
  margin-bottom: 0;
}

#file_list_display {
  font-size: 11.5px;
  color: var(--theme-navy);
  margin-top: 6px;
  font-weight: 500;
  word-break: break-all;
}

/* ================================================================
   TERMS & SIGNATURE
   ================================================================ */
.terms-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.terms-item input[type="checkbox"] {
  accent-color: var(--theme-primary);
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}

.terms-item label {
  font-size: 12px;
  color: #334155;
  font-weight: 500;
  margin-bottom: 0;
  line-height: 1.4;
  cursor: pointer;
}

.terms-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f1f6fb;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: #1e293b;
  border: 1px solid #dce8f2;
}

.terms-meta-row strong {
  color: var(--theme-navy);
}

.signature-container {
  border: 1.5px dashed #94a3b8;
  border-radius: 8px;
  background: #fafcff;
  position: relative;
  overflow: hidden;
  height: 98px;
}

#signature_pad {
  width: 100%;
  height: 98px;
  display: block;
  cursor: crosshair;
}

.signature-placeholder {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12.5px;
  font-style: italic;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-clear-sig {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 11px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 8px;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}

.btn-clear-sig:hover {
  background: #fee2e2;
  color: var(--theme-danger-dark);
  border-color: #fca5a5;
}

/* ================================================================
   ACTION BUTTONS (ABOVE FOOTER)
   ================================================================ */
.consignment-wrapper {
  padding-bottom: 50px !important;
}

.action-buttons-box {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 10px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  width: 100% !important;
}

.action-bar-btns {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

.btn-submit-consignment {
  background: linear-gradient(135deg, #33a0e1 0%, #0b3762 100%);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 34px;
  min-height: 46px;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(11, 55, 98, 0.25);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-submit-consignment:hover {
  background: linear-gradient(135deg, #0b3762 0%, #072543 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(11, 55, 98, 0.35);
  color: #ffffff;
}

.btn-reset-consignment {
  background: #ffffff;
  color: #475569;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 26px;
  min-height: 46px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-reset-consignment:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: translateY(-1px);
}
  background: #ffffff;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-reset-consignment:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Scroll to top button */
.scroll-top-percentage {
  bottom: 40px !important;
}

/* ================================================================
   SUCCESS ALERT
   ================================================================ */
.consignment-alert {
  border-radius: 10px;
  font-size: 14px;
  padding: 16px 22px;
  margin-bottom: 24px;
  border-left: 5px solid #10b981;
}

/* ================================================================
   RESPONSIVE DESIGN
   ================================================================ */
@media (max-width: 991px) {
  .steps-list {
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .step-node {
    white-space: nowrap;
  }
  .action-buttons-box {
    flex-direction: column-reverse;
  }
  .btn-submit-consignment,
  .btn-reset-consignment {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 767px) {
  .consignment-header-banner {
    padding: 16px;
  }
  .consignment-header-banner .banner-title {
    font-size: 19px;
  }
  .cs-card-header {
    font-size: 13px;
    padding: 8px 12px;
  }
  .cs-card-body {
    padding: 12px;
  }
  .freight-table-responsive {
    overflow-x: auto;
  }
  .freight-table {
    min-width: 800px;
  }
}
