/* ── MenuPlay — Repartidor ───────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body { background: #0D0D0D; color: #f0f0f0; font-family: -apple-system, sans-serif; }

#mp-rep-app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
#mp-rep-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
}
.mp-rep-logo { font-weight: 700; color: #E8A020; font-size: 15px; }
#mp-rep-order-label { font-size: 13px; color: #888; }

/* ── GPS status bar ─────────────────────────────────────────────────────── */
#mp-rep-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #111;
  font-size: 13px;
  flex-shrink: 0;
}

#mp-rep-gps-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
#mp-rep-gps-dot.active   { background: #22c55e; box-shadow: 0 0 6px #22c55e; animation: pulse-gps 2s infinite; }
#mp-rep-gps-dot.waiting  { background: #f59e0b; }
#mp-rep-gps-dot.error    { background: #ef4444; }
#mp-rep-gps-dot.inactive { background: #555; }

@keyframes pulse-gps {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Mapa ────────────────────────────────────────────────────────────────── */
#mp-rep-map {
  flex: 1;
  min-height: 0;
  z-index: 0;
}

/* ── Info del pedido ────────────────────────────────────────────────────── */
#mp-rep-info {
  background: #1a1a1a;
  padding: 14px 16px 10px;
  border-top: 1px solid #2a2a2a;
  flex-shrink: 0;
  max-height: 30dvh;
  overflow-y: auto;
}

.mp-rep-info-label {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

#mp-rep-address-box { margin-bottom: 10px; }
#mp-rep-address { font-size: 15px; font-weight: 600; color: #f0f0f0; }

#mp-rep-items-box { margin-bottom: 10px; }
.mp-rep-item-row { font-size: 13px; color: #ccc; padding: 2px 0; }

#mp-rep-note-box { margin-bottom: 6px; }
#mp-rep-note { font-size: 13px; color: #aaa; font-style: italic; }

/* ── Botón de entrega ────────────────────────────────────────────────────── */
#mp-rep-actions {
  padding: 12px 16px;
  background: #1a1a1a;
  border-top: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.mp-rep-btn-deliver {
  width: 100%;
  padding: 14px;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, opacity .2s;
}
.mp-rep-btn-deliver:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
}
.mp-rep-btn-deliver:not(:disabled):active { background: #16a34a; }

/* ── Pins del mapa ───────────────────────────────────────────────────────── */
.mp-map-pin {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: #1a1a1a;
  border-radius: 50%;
  border: 2px solid #333;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.mp-map-pin-rep  { border-color: #E8A020; }
.mp-map-pin-rest { border-color: #555; }

/* ── Error ───────────────────────────────────────────────────────────────── */
.mp-rep-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  padding: 32px;
  text-align: center;
  font-size: 16px;
  color: #ef4444;
  line-height: 1.5;
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
#mp-rep-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #222;
  color: #f0f0f0;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9999;
}
#mp-rep-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
