/* ==========================================================================
   Dundee Movers CRM — Slide-Out Side Drawer Component
   Enables review of full customer details, logistics, media, and inline pricing.
   ========================================================================== */

/* Drawer Backdrop */
.lead-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lead-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Drawer Sliding Panel */
.lead-drawer-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 580px;
  max-width: 100vw;
  background: #ffffff;
  z-index: 1000;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.lead-drawer-panel.open {
  transform: translateX(0);
}

/* Drawer Header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.drawer-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.drawer-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.drawer-title-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.drawer-ref-code {
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
}

.drawer-contact-sub {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.drawer-contact-sub a {
  color: #065f46;
  text-decoration: none;
  font-weight: 600;
}

.drawer-contact-sub a:hover {
  text-decoration: underline;
}

.drawer-close-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* Drawer Scrollable Content */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: #f8fafc;
}

/* Highlighted Smart Pricing & Move Pass Action Deck */
.drawer-pricing-box {
  background: #ffffff;
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dp-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dp-heading {
  font-size: 0.95rem;
  font-weight: 800;
  color: #064e3b;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dp-presets-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dp-preset-label {
  font-size: 0.725rem;
  font-weight: 600;
  color: #64748b;
}

.dp-preset-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dp-preset-btn:hover {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.dp-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.dp-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.dp-input-label {
  font-size: 0.775rem;
  font-weight: 700;
  color: #334155;
}

.dp-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.dp-curr-sign {
  position: absolute;
  left: 0.75rem;
  font-weight: 700;
  color: #64748b;
  font-size: 0.9rem;
}

.dp-number-input {
  width: 100%;
  padding: 0.6rem 0.75rem 0.6rem 1.6rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  outline: none;
  transition: all 0.2s ease;
}

.dp-number-input:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.dp-actions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dp-btn-primary {
  flex: 1;
  min-width: 160px;
  background: #059669;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background 0.15s ease;
}

.dp-btn-primary:hover {
  background: #047857;
}

.dp-btn-secondary {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: all 0.15s ease;
}

.dp-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.dp-btn-wa {
  background: #25d366;
  border: 1px solid #16a34a;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.dp-btn-wa:hover {
  opacity: 0.92;
}

/* Stage Mover Selector Inside Drawer */
.dp-stage-mover {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px dashed #cbd5e1;
  font-size: 0.8rem;
  color: #475569;
}

.dp-stage-select {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
}

/* Drawer Section Cards */
.drawer-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.15rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.drawer-section-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Route Grid Inside Drawer */
.drawer-route-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.drawer-route-point {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: #f8fafc;
  padding: 0.85rem;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.drp-label {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}

.drp-address {
  font-size: 0.925rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.drp-chips {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}

/* Manifest Item Pills */
.drawer-manifest-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.drawer-manifest-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
}

.drawer-item-badge {
  background: #065f46;
  color: #ffffff;
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  font-size: 0.725rem;
  font-weight: 800;
}

/* Special Instructions Box */
.drawer-notes-box {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 8px;
  font-size: 0.825rem;
  color: #92400e;
  line-height: 1.4;
}

/* Fleet Specs Bar */
.drawer-fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.65rem;
}

.drawer-fleet-metric {
  background: #f8fafc;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.dfm-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.dfm-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

/* Mobile Responsiveness for Drawer */
@media (max-width: 768px) {
  .lead-drawer-panel {
    width: 100vw;
  }

  .drawer-route-grid {
    grid-template-columns: 1fr;
  }

  .dp-inputs-grid {
    grid-template-columns: 1fr;
  }

  .drawer-header {
    padding: 0.85rem 1rem;
  }

  .drawer-body {
    padding: 1rem;
  }
}
