/* driver/assets/style/delivery.css */

/* ── Toggle switch ──────────────────────────────────────────────────────── */
.toggleSwitch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
  cursor: pointer;
  flex-shrink: 0;
}
.toggleSwitch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggleThumb {
  position: absolute;
  inset: 0;
  background: #444;
  border-radius: 28px;
  transition: background .2s;
}
.toggleThumb::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.toggleSwitch input:checked + .toggleThumb { background: #F9D515; }
.toggleSwitch input:checked + .toggleThumb::before { transform: translateX(20px); }

/* ── Toggle row ─────────────────────────────────────────────────────────── */
.dlvToggleRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.dlvToggleRow:last-child { border-bottom: none; }
.dlvToggleLabel { font-size: .9rem; line-height: 1.3; }
.dlvToggleHint  { font-size: .75rem; opacity: .55; margin-top: 2px; }

/* ── Delivery boxes (single + batch) ──────────────────────────────────── */
.dlvBox {
  background: rgba(249, 213, 21, .07);
  border: 1px solid rgba(249, 213, 21, .25);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 12px;
}
.dlvBoxTitle {
  font-weight: 700;
  font-size: 1rem;
  color: #F9D515;
  margin-bottom: 8px;
}
.dlvInfoText {
  font-size: .875rem;
  line-height: 1.55;
  color: #e0e0e0;
}
.dlvActions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.dlvActions .btn { flex: 1; font-size: .875rem; }

/* ── Batch offer ────────────────────────────────────────────────────────── */
.dlvBatchMeta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.dlvMetaChip {
  background: rgba(249,213,21,.12);
  border: 1px solid rgba(249,213,21,.3);
  color: #F9D515;
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}
.dlvBatchStopsPreview {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}
.dlvStopPreview {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: #c8c8c8;
}
.dlvStopNum {
  background: rgba(255,255,255,.1);
  color: #fff;
  font-weight: 700;
  font-size: .72rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dlvStopAddr {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Batch active: progress bar ─────────────────────────────────────────── */
.dlvBatchHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dlvBatchEarningsLabel {
  font-size: .78rem;
  opacity: .65;
}
.dlvBatchEarningsVal {
  font-size: 1.05rem;
  font-weight: 700;
  color: #F9D515;
}
.dlvProgressWrap {
  background: rgba(255,255,255,.1);
  border-radius: 8px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}
.dlvProgressBar {
  height: 100%;
  background: #F9D515;
  border-radius: 8px;
  transition: width .4s ease;
}
.dlvProgressTxt {
  font-size: .73rem;
  opacity: .6;
  margin-bottom: 12px;
}

/* ── Batch active: stops list ────────────────────────────────────────────── */
.dlvBatchStopsList {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  max-height: 220px;
  overflow-y: auto;
}
.dlvBatchStop {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  transition: background .15s;
}
.dlvBatchStop--active {
  background: rgba(249,213,21,.1);
  border-color: rgba(249,213,21,.35);
}
.dlvBatchStop--done {
  opacity: .5;
}
.dlvStopBullet {
  font-size: 1.1rem;
  margin-top: 1px;
  flex-shrink: 0;
}
.dlvStopBody {
  flex: 1;
  min-width: 0;
}
.dlvStopName {
  font-size: .85rem;
  font-weight: 600;
  color: #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dlvStopAddr {
  font-size: .75rem;
  opacity: .65;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dlvStopVal {
  font-size: .78rem;
  color: #F9D515;
  margin-top: 2px;
  font-weight: 600;
}
.dlvStopVal--done {
  color: #4caf50;
}
.dlvStopNav {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  opacity: .85;
}
.dlvStopNav:hover { opacity: 1; }

/* ── Delivery code modal ─────────────────────────────────────────────────── */
.dlvCodeModal {
  position: fixed;
  inset: 0;
  z-index: 9900;
  background: rgba(0,0,0,.65);
  display: flex;
  align-items: flex-end;
}
.dlvCodeSheet {
  width: 100%;
  background: #1a1a1a;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 32px;
  max-width: 480px;
  margin: 0 auto;
}
.dlvCodeTitle {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.dlvCodeHint {
  font-size: .82rem;
  opacity: .65;
  margin-bottom: 14px;
}
.dlvCodeSheet .input {
  width: 100%;
  font-size: 1.4rem;
  text-align: center;
  letter-spacing: .25em;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #333;
  background: #111;
  color: #fff;
  outline: none;
}
.dlvCodeSheet .input:focus { border-color: #F9D515; }
.dlvCodeActions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.dlvCodeActions .btn { flex: 1; }
.dlvCodeErr {
  color: #ff6b6b;
  font-size: .82rem;
  margin-top: 8px;
  min-height: 18px;
}

/* ── History items ───────────────────────────────────────────────────────── */
.dliMain { font-weight: 600; font-size: .9rem; }
.dliSub  { font-size: .78rem; opacity: .7; margin-top: 2px; }
.dliMeta { font-size: .78rem; color: #F9D515; margin-top: 3px; }

/* ── Chip da plataforma de origem (iFood/99Food) ───────────────────────── */
.dlvPf {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  vertical-align: middle;
  color: #fff;
}
.dlvPf--ifood  { background: #ea1d2c; }
.dlvPf--99food { background: #ff9015; }
