/* =========================================================
   EGYPTIAN PHARAOH CAFÉ — ORDER TRAY & CART SLIDEOUT
   ========================================================= */

.ph-cart-fab,
.flr-cart-fab {
    position: fixed;
    bottom: calc(var(--ph-nav-bottom-h) + 16px);
    left: 20px;
    z-index: 990;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2D251D 0%, #171411 100%);
    border: 1.5px solid var(--ph-gold);
    border-radius: var(--ph-radius-cartouche);
    color: var(--ph-gold-bright);
    font-family: var(--ph-font-body);
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75), 0 0 16px var(--ph-gold-glow);
    cursor: pointer;
    transition: all var(--ph-transition-fast);
}

@media (min-width: 992px) {
    .ph-cart-fab,
    .flr-cart-fab {
        bottom: 24px;
        left: 24px;
    }
}

.ph-cart-fab:hover,
.flr-cart-fab:hover {
    transform: translateY(-2px) scale(1.03);
    border-color: var(--ph-gold-bright);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.8), 0 0 24px var(--ph-gold-glow);
}

.ph-cart-fab__count,
.flr-cart-fab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding-inline: 6px;
    border-radius: 12px;
    background: var(--ph-gold-foil);
    color: #171411;
    font-size: 0.82rem;
    font-weight: 800;
}

.ph-tray,
.flr-order-drawer {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    justify-content: flex-start;
    transition: visibility 0.35s var(--ph-ease-ceremony);
}

.ph-tray[aria-hidden="true"],
.flr-order-drawer[aria-hidden="true"] {
    visibility: hidden;
    pointer-events: none;
}

.ph-tray__veil,
.flr-order-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 7, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.35s var(--ph-ease-ceremony);
}

.ph-tray:not([aria-hidden="true"]) .ph-tray__veil,
.flr-order-drawer:not([aria-hidden="true"]) .flr-order-drawer__overlay {
    opacity: 1;
}

.ph-tray__panel,
.flr-order-drawer__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    height: 100%;
    background: linear-gradient(175deg, #272019 0%, #171411 100%);
    border-left: 1.5px solid var(--ph-gold);
    box-shadow: -10px 0 36px rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s var(--ph-ease-ceremony);
    overflow: hidden;
}

.ph-tray:not([aria-hidden="true"]) .ph-tray__panel,
.flr-order-drawer:not([aria-hidden="true"]) .flr-order-drawer__panel {
    transform: translateX(0);
}

.ph-tray__head,
.flr-order-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(201, 162, 74, 0.25);
    background: rgba(23, 20, 17, 0.9);
}

.ph-tray__head h2,
.flr-order-drawer__head h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ph-papyrus-bright);
    margin: 0;
}

.ph-tray__close,
.flr-order-drawer__close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(201, 162, 74, 0.3);
    background: #171411;
    color: var(--ph-gold);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--ph-transition-fast);
}

.ph-tray__close:hover,
.flr-order-drawer__close:hover {
    border-color: var(--ph-gold);
    color: var(--ph-gold-bright);
    box-shadow: 0 0 10px var(--ph-gold-glow);
}

.ph-tray__body,
.flr-order-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.flr-order-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flr-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #201A14;
    border: 1px solid rgba(201, 162, 74, 0.22);
    border-radius: var(--ph-radius-md);
    transition: border-color var(--ph-transition-fast), background var(--ph-transition-fast);
}

.flr-order-item:hover {
    border-color: rgba(201, 162, 74, 0.4);
    background: #261F18;
}

.flr-order-item__img {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    flex-shrink: 0;
    border-radius: var(--ph-radius-sm);
    overflow: hidden;
    background: #171411;
    border: 1px solid rgba(201, 162, 74, 0.35);
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.6);
}

.flr-order-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flr-order-item__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.flr-order-item__title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--ph-papyrus-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.flr-order-item__price {
    font-size: 0.78rem;
    color: var(--ph-gold);
    font-family: var(--ph-font-body);
    font-weight: 600;
    white-space: nowrap;
}

.flr-order-item__copy strong {
    display: block;
    font-size: 0.88rem;
    color: var(--ph-papyrus-bright);
}

.flr-order-item__copy small {
    font-size: 0.78rem;
    color: var(--ph-gold);
}

.flr-order-item__remove {
    background: none;
    border: none;
    color: var(--ph-text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: color var(--ph-transition-fast);
}

.flr-order-item__remove:hover {
    color: var(--ph-status-danger);
}

.flr-order-item .flr-qty {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    background: #171411;
    border: 1px solid rgba(201, 162, 74, 0.35);
    border-radius: var(--ph-radius-sm);
    padding: 2px 4px;
    gap: 4px;
}

.flr-order-item .flr-qty__btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #272019;
    border: 1px solid rgba(201, 162, 74, 0.25);
    border-radius: 4px;
    color: var(--ph-gold);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--ph-transition-fast);
}

.flr-order-item .flr-qty__btn:hover {
    background: rgba(201, 162, 74, 0.2);
    border-color: var(--ph-gold);
    color: var(--ph-gold-bright);
}

.flr-order-item .flr-qty__value {
    min-width: 20px;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ph-papyrus-bright);
}

.ph-tray__total,
.flr-order-summary {
    background: #1D1813;
    border: 1px solid rgba(201, 162, 74, 0.25);
    border-radius: var(--ph-radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ph-tray__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--ph-text-secondary);
}

.ph-tray__row--payable {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ph-gold-bright);
    border-top: 1px solid rgba(201, 162, 74, 0.2);
    padding-top: 10px;
    margin-top: 4px;
}

.ph-field,
.flr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ph-field label,
.flr-field label,
.flr-field__label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ph-sand);
}

.ph-field input,
.ph-field textarea,
.np-input,
.flr-field input {
    width: 100%;
    padding: 10px 14px;
    background: #1D1813;
    border: 1px solid rgba(201, 162, 74, 0.3);
    border-radius: var(--ph-radius-sm);
    color: var(--ph-papyrus);
    font-family: var(--ph-font-body);
    font-size: 0.92rem;
    transition: all var(--ph-transition-fast);
}

.ph-field input:focus,
.ph-field textarea:focus,
.np-input:focus {
    outline: none;
    border-color: var(--ph-gold);
    box-shadow: 0 0 12px var(--ph-gold-glow);
}

.ph-modes,
.flr-order-types {
    display: flex;
    gap: 10px;
}

.ph-mode,
.flr-order-type {
    flex: 1;
    cursor: pointer;
    margin: 0;
}

.flr-order-type__input {
    display: none;
}

.ph-mode__face,
.flr-order-type__face {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #201A14;
    border: 1px solid rgba(201, 162, 74, 0.25);
    border-radius: var(--ph-radius-sm);
    color: var(--ph-text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all var(--ph-transition-fast);
}

.flr-order-type__input:checked + .flr-order-type__face,
.flr-order-type__input:checked + .ph-mode__face {
    background: rgba(201, 162, 74, 0.15);
    border-color: var(--ph-gold);
    color: var(--ph-gold-bright);
    box-shadow: 0 0 12px var(--ph-gold-glow);
}

.ph-tables,
.bn-tables {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #1B1611;
    border: 1px solid rgba(201, 162, 74, 0.2);
    border-radius: var(--ph-radius-md);
    padding: 14px;
}

.ph-tables__label,
.bn-tables__label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ph-sand);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
}

.ph-tables__grid,
.bn-tables__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.ph-table-chip,
.bn-table-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    background: #272019;
    border: 1px solid rgba(201, 162, 74, 0.3);
    border-radius: var(--ph-radius-sm);
    color: var(--ph-papyrus);
    cursor: pointer;
    transition: all var(--ph-transition-fast);
    font-family: var(--ph-font-body);
}

.ph-table-chip strong,
.bn-table-chip strong {
    font-size: 1rem;
    font-family: var(--ph-font-display);
    color: var(--ph-gold-bright);
}

.ph-table-chip small,
.bn-table-chip small {
    font-size: 0.68rem;
    color: var(--ph-text-secondary);
}

.ph-table-chip:hover:not(:disabled),
.bn-table-chip:hover:not(:disabled) {
    border-color: var(--ph-gold);
    background: #352C23;
}

.ph-table-chip.is-selected,
.bn-table-chip.is-selected {
    background: var(--ph-gold-foil);
    border-color: var(--ph-gold-bright);
    color: #171411;
    box-shadow: 0 0 14px rgba(201, 162, 74, 0.5);
}

.ph-table-chip.is-selected strong,
.bn-table-chip.is-selected strong,
.ph-table-chip.is-selected small,
.bn-table-chip.is-selected small {
    color: #171411;
}

.ph-table-chip.is-reserved,
.bn-table-chip.is-reserved {
    border-color: #B8863A;
    background: rgba(184, 134, 58, 0.12);
}

.ph-table-chip.is-busy,
.bn-table-chip.is-busy {
    opacity: 0.45;
    cursor: not-allowed;
    background: #1B1713;
    border-color: #383028;
}

.ph-captcha,
.bn-captcha,
.flr-captcha-row {
    display: flex;
    gap: 8px;
}

.ph-captcha input,
.bn-captcha input {
    flex: 1;
}

.ph-captcha button,
.bn-captcha button {
    padding-inline: 14px;
}

.ph-toast,
.bn-toast,
.flr-order-toast {
    position: fixed;
    top: calc(var(--ph-header-h) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    background: linear-gradient(135deg, #2D251D 0%, #171411 100%);
    border: 1px solid var(--ph-gold);
    border-radius: var(--ph-radius-cartouche);
    padding: 12px 24px;
    color: var(--ph-gold-bright);
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 18px var(--ph-gold-glow);
    animation: ph-toast-in 0.35s var(--ph-ease-ceremony);
}

@keyframes ph-toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}
