/* Çalışan (sipariş) arayüzü */

.muted { color: var(--muted); margin: 0 0 14px; font-size: 0.92rem; }

/* ------------------------------ zil düğmesi ------------------------------ */

.ring-bar { margin-bottom: 16px; }
.btn.ring {
  background: var(--cancel);
  color: #fff;
  border-color: transparent;
  font-size: 1.05rem;
}
.btn.ring:disabled { background: var(--surface-2); color: var(--muted); border-color: var(--border); opacity: 1; }
.ring-hint { margin: 6px 2px 0; font-size: 0.8rem; color: var(--muted); text-align: center; }

/* ---------------------------- sipariş hakkı ---------------------------- */

.quota {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border-radius: 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}
.quota .ic { font-size: 1.2rem; line-height: 1; }
.quota b { color: var(--text); }
.quota.full {
  background: var(--cancel-soft);
  border-color: color-mix(in srgb, var(--cancel) 35%, var(--border));
  color: var(--cancel);
}
.quota.full b { color: var(--cancel); }

/* --------------------------- kategori akordeonu --------------------------- */

.cat {
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.cat.open { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }

.cat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  font-size: 1.02rem;
  font-weight: 650;
  text-align: left;
}
.cat.open .cat-head { border-bottom: 1px solid var(--border); }
.cat-head .ic { font-size: 1.5rem; line-height: 1; }
.cat-head .ttl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-head .cnt { font-size: 0.78rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.cat-head .chev { color: var(--muted); transition: transform 0.2s; }
.cat.open .cat-head .chev { transform: rotate(180deg); }

.cat-badge {
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.84rem;
  font-weight: 700;
}

.cat-body { padding: 12px; animation: cat-open 0.2s ease-out; }
@keyframes cat-open { from { opacity: 0; transform: translateY(-6px); } }
.cat-body .drink { background: var(--surface-2); }

/* -------------------------------- menü -------------------------------- */

.menu {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
}

.drink {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 16px 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.08s, background 0.15s;
  text-align: center;
}
.drink:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.drink:active { transform: scale(0.98); }
.drink.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.drink .emoji { font-size: 1.9rem; line-height: 1.1; }
.drink .name { font-weight: 600; font-size: 0.95rem; }
.drink .hint { font-size: 0.76rem; color: var(--muted); }

.drink .badge {
  position: absolute;
  top: -8px;
  right: -6px;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.drink .minus {
  position: absolute;
  top: -8px;
  left: -6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1.15rem;
  line-height: 1;
  padding: 0;
  box-shadow: var(--shadow);
}

/* ------------------------------ sepet çubuğu ------------------------------ */

.cartbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  animation: cart-in 0.2s ease-out;
}
.cartbar.urgent { border-top: 3px solid var(--cancel); }
@keyframes cart-in { from { transform: translateY(100%); } }

/* grid-template-columns: minmax(0,1fr) olmadan uzun içerik izi (track) genişletip
   satırı kapsayıcının dışına taşırır — "Sipariş Ver" ekranın dışında kalır. */
.cartbar .inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.cart-row { display: flex; align-items: center; gap: 10px; }
/* min-width:0 olmadan uzun özet metni butonu ekran dışına iter (flex min-content kuralı). */
.cart-sum {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-sum b { color: var(--text); }

.cart-opts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.85rem;
  max-width: 100%;
}
.mini-select {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 0.85rem;
  font-weight: 600;
  max-width: 46vw;
  padding: 4px 0;
}

.prio {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  gap: 3px;
}
.prio button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--muted);
}
.prio button.on { background: var(--accent); color: var(--accent-text); }
.prio button[data-p="urgent"].on { background: var(--cancel); color: #fff; }

/* Sepet çubuğu açıkken bildirimler onun üstünde kalsın. */
body.has-cart #toasts { bottom: calc(128px + env(safe-area-inset-bottom)); }

/* ------------------------------ siparişlerim ------------------------------ */

.orders { display: grid; gap: 10px; }

.order {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.order.is-preparing { border-color: color-mix(in srgb, var(--prep) 45%, var(--border)); }
.order.is-urgent { border-left: 5px solid var(--cancel); }
.order.is-delivered { opacity: 0.72; }
.order.is-cancelled { opacity: 0.6; }

.order .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.order .head time { font-size: 0.84rem; color: var(--muted); }
.order .head .spacer { flex: 1; }

.order .dest {
  margin-bottom: 8px;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
}

.order .lines { display: grid; gap: 3px; }
.order .line { display: flex; align-items: baseline; gap: 8px; font-size: 1rem; }
.order .line .q { font-weight: 700; color: var(--accent); min-width: 30px; }

.notes { display: grid; gap: 5px; margin-top: 9px; }
.notes .note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--bg-soft);
  font-size: 0.88rem;
}
.notes .note.from-kitchen { background: var(--prep-soft); color: var(--prep); font-weight: 550; }
.notes .note time { margin-left: auto; font-size: 0.75rem; opacity: 0.7; white-space: nowrap; }

.order .foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.order .foot .spacer { flex: 1; }

.note-form { display: flex; gap: 8px; margin-top: 9px; }
.note-form .input { min-height: 40px; }

/* adım göstergesi */
.steps { display: flex; align-items: start; gap: 6px; margin-top: 12px; }
.steps .step {
  flex: 1;
  display: grid;
  gap: 3px;
  justify-items: center;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  min-width: 0;
}
.steps .bar { width: 100%; height: 4px; border-radius: 2px; background: var(--border); }
.steps .step.on .bar { background: var(--accent); }
.steps .step.on .lbl { color: var(--text); font-weight: 600; }
.steps .tm { font-size: 0.68rem; opacity: 0.75; }
