﻿/* ANDO — Cart FAB & order drawer */

.ao-cart-fab {
    position: fixed;
    inset-inline-end: 16px;
    bottom: calc(var(--ao-dock-h) + 16px);
    z-index: 45;
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 16px;
    border-radius: var(--ao-radius-pill);
    background: var(--ao-surface);
    color: var(--ao-primary-deep);
    font-weight: 700;
    border: 1px solid var(--ao-border);
    box-shadow: var(--ao-shadow-md);
}

.ao-cart-fab__crest { width: 22px; height: 22px; }

.ao-cart-fab__count {
    min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
    background: var(--ao-primary); color: #fff; font-size: 0.75rem;
    display: inline-flex; align-items: center; justify-content: center;
}

@media (min-width: 900px) { .ao-cart-fab { bottom: 28px; } }

.ao-drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; pointer-events: none; }
.ao-drawer.is-open { visibility: visible; pointer-events: auto; }

.ao-drawer__overlay {
    position: absolute; inset: 0; background: rgba(25, 25, 25, 0.48);
    opacity: 0; transition: opacity 0.25s ease;
}
.ao-drawer.is-open .ao-drawer__overlay { opacity: 1; }

.ao-drawer__panel {
    position: absolute; top: 0; inset-inline-end: 0; width: min(100%, 420px); height: 100%;
    background: var(--ao-bg); border-inline-start: 1.5px solid var(--ao-border);
    display: flex; flex-direction: column; transform: translateX(105%);
    transition: transform 0.3s var(--ao-ease); color: var(--ao-ink);
}
[dir="rtl"] .ao-drawer__panel { transform: translateX(-105%); }
.ao-drawer.is-open .ao-drawer__panel { transform: translateX(0); }

.ao-drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--ao-border);
}
.ao-drawer__title { margin: 0; font-size: 1.15rem; font-weight: 800; }
.ao-drawer__close {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ao-border);
    font-size: 1.35rem; color: var(--ao-ink); background: var(--ao-surface);
}
.ao-drawer__body { flex: 1; overflow: auto; padding: 16px 18px 28px; }
.ao-drawer__empty { text-align: center; padding: 28px 12px; }

.ao-cart-item {
    display: grid; grid-template-columns: 56px 1fr; gap: 12px;
    padding: 12px 0; border-bottom: 1px dashed var(--ao-border);
}
.ao-cart-item__media {
    width: 56px; height: 56px; border-radius: 12px; overflow: hidden;
    border: 1px solid var(--ao-border); background: var(--ao-bg-alt);
}
.ao-cart-item__img { width: 100%; height: 100%; object-fit: cover; }
.ao-cart-item__placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--ao-ink-muted);
}
.ao-cart-item__title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ao-cart-item__title { font-size: 0.95rem; }
.ao-cart-item__remove { width: 28px; height: 28px; border-radius: 50%; color: var(--ao-ink-muted); font-size: 1.1rem; }
.ao-cart-item__variant { display: block; color: var(--ao-ink-muted); font-size: 0.8rem; margin-top: 2px; }
.ao-cart-item__footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.ao-cart-item__price { font-weight: 700; color: var(--ao-primary-deep); }

.ao-summary-box {
    margin: 16px 0; padding: 14px; border-radius: 16px;
    border: 1.5px solid var(--ao-border); background: var(--ao-surface);
}
.ao-summary-row {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 6px 0; color: var(--ao-ink-muted); font-size: 0.9rem;
}
.ao-summary-row--payable {
    margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--ao-border);
    color: var(--ao-primary-deep); font-size: 1rem; font-weight: 800;
}

.ao-form-field { margin-bottom: 14px; }
.ao-form-field__label, .ao-form-field > label {
    display: block; margin-bottom: 8px; font-weight: 700; font-size: 0.9rem;
}

.ao-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ao-mode { cursor: pointer; }
.ao-mode input { position: absolute; opacity: 0; pointer-events: none; }
.ao-mode__face {
    display: flex; align-items: center; justify-content: center; min-height: 44px;
    border-radius: var(--ao-radius-pill); border: 1.5px solid var(--ao-border);
    background: var(--ao-surface); color: var(--ao-ink); font-weight: 600;
}
.ao-mode input:checked + .ao-mode__face {
    background: var(--ao-primary); color: #fff; border-color: var(--ao-primary);
}

.ao-tables-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ao-table-chip {
    min-height: 56px; padding: 8px; border-radius: 14px; border: 1.5px solid var(--ao-border);
    background: var(--ao-surface); color: var(--ao-ink);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.ao-table-chip.is-selected { background: var(--ao-primary); color: #fff; border-color: var(--ao-primary); }
.ao-table-chip.is-busy, .ao-table-chip:disabled { opacity: 0.4; cursor: not-allowed; }
.ao-table-chip.is-reserved { border-style: dashed; }
.ao-table-chip small { font-size: 0.7rem; opacity: 0.8; }

.ao-captcha-row { display: flex; gap: 10px; }

.ao-order-alert {
    margin: 10px 0; padding: 10px 12px; border-radius: 12px;
    border: 1px solid var(--ao-border); background: var(--ao-surface);
    font-size: 0.88rem; color: var(--ao-ink);
}
.ao-order-alert.is-error {
    border-color: rgba(139, 30, 30, 0.35); color: var(--ao-danger);
    background: rgba(139, 30, 30, 0.06);
}
.ao-order-alert.is-success {
    border-color: rgba(47, 93, 58, 0.35); color: var(--ao-success);
    background: rgba(47, 93, 58, 0.06);
}

.ao-toast {
    position: fixed; left: 50%; bottom: calc(var(--ao-dock-h) + 24px);
    transform: translateX(-50%); z-index: 100; padding: 12px 18px;
    border-radius: var(--ao-radius-pill); background: var(--ao-surface);
    color: var(--ao-primary-deep); font-weight: 700; border: 1px solid var(--ao-border);
    box-shadow: var(--ao-shadow-md);
}
@media (min-width: 900px) { .ao-toast { bottom: 32px; } }
@media (max-width: 640px) {
    .ao-drawer__panel { width: 100%; }
    .ao-tables-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
