/* ══════════════════════════════════════════════════════════════════════════
   Branch & Delivery Zone Selector Styles
   Strict Standard: Zero Unicode Emojis (SVG icons only), High-End Industrial Aesthetic
   ══════════════════════════════════════════════════════════════════════════ */

/* 1. Legacy Persistent Top Location Bar (Suppressed in favor of Single-Row Header Pill) */
.cc-branch-bar,
#ccBranchBar {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.cc-branch-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cc-branch-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.cc-branch-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
}

.cc-branch-badge svg {
  flex-shrink: 0;
}

.cc-branch-divider {
  color: #4b5563;
  user-select: none;
}

.cc-branch-delivery-info {
  color: #e5e7eb;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cc-branch-zone-highlight {
  color: #fbbf24;
  font-weight: 700;
}

.cc-branch-fee-highlight {
  color: #34d399;
  font-weight: 700;
}

.cc-branch-time-highlight {
  color: #93c5fd;
  font-weight: 600;
  font-size: 0.76rem;
}

.cc-branch-change-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cc-branch-change-btn:hover {
  background: #111827;
  border-color: #111827;
  color: #fbbf24;
  transform: translateY(-1px);
}

/* 2. Modal Overlay & Dialog */
.cc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cc-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cc-modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  text-align: right;
  font-family: inherit;
}

.cc-modal-overlay.open .cc-modal-dialog {
  transform: scale(1);
}

/* Modal Header */
.cc-modal-head {
  padding: 18px 20px 14px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
}

.cc-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cc-modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(251, 191, 36, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cc-modal-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.cc-modal-subtitle {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.cc-modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-modal-close-btn:hover {
  background: #111827;
  color: #fbbf24;
}

/* Modal Tabs */
.cc-modal-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 6px;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.cc-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.cc-tab-btn svg {
  stroke-width: 2;
}

/* Modal Body */
.cc-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  max-height: calc(90vh - 190px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* GPS Button */
.cc-gps-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-gps-btn:hover {
  background: #f1f5f9;
  border-color: #fbbf24;
  color: #111827;
}

.cc-gps-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.cc-gps-alert {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cc-gps-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.cc-gps-alert.warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Delivery Zone Options Grid */
.cc-zone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cc-zone-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-zone-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.cc-zone-card.selected {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 0 1px #f59e0b;
}

.cc-zone-start {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cc-zone-radio {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.cc-zone-card.selected .cc-zone-radio {
  border-color: #f59e0b;
}

.cc-zone-radio-inner {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s ease;
}

.cc-zone-card.selected .cc-zone-radio-inner {
  background: #f59e0b;
}

.cc-zone-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cc-zone-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #0f172a;
}

.cc-zone-eta {
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cc-zone-fee-badge {
  font-weight: 800;
  font-size: 0.88rem;
  color: #111827;
  background: rgba(251, 191, 36, 0.2);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  white-space: nowrap;
}

/* Branch Pickup Details */
.cc-branch-pickup-card {
  padding: 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.cc-pickup-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.cc-pickup-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 8px;
  border-radius: 999px;
}

.cc-pickup-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: #475569;
}

.cc-pickup-row strong {
  color: #0f172a;
}

.cc-pickup-free-badge {
  font-weight: 800;
  font-size: 0.95rem;
  color: #059669;
}

/* Modal Footer */
.cc-modal-foot {
  padding: 14px 20px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.cc-modal-btn-cancel {
  padding: 9px 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #475569;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-modal-btn-cancel:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.cc-modal-btn-confirm {
  padding: 9px 20px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border: none;
  border-radius: 8px;
  color: #111827;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cc-modal-btn-confirm:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  transform: translateY(-1px);
}

@media screen and (max-width: 600px) {
  .cc-branch-bar-container {
    padding: 6px 12px;
  }
  .cc-branch-delivery-info {
    font-size: 0.76rem;
  }
  .cc-branch-change-btn {
    font-size: 0.72rem;
    padding: 2px 8px;
  }
}
