/* ==========================================================================
   ROU — guest "My list", "Show to waiter", pay help and split (D-355).
   Scoped to .rou-glistbar / .rou-gshow / .rou-gpay / .rou-glist-add / .rou-gpay-trigger
   so nothing here can leak into the restaurant's own landing design.
   Type scale and radii follow the ROU admin contract: 12/14/16/20/30 and 4/8/12/999.
   ========================================================================== */

.rou-glist-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #e5ded4;
    border-radius: 8px;
    background: #ffffff;
    color: #1c1917;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rou-glist-add:hover,
.rou-glist-add:focus-visible {
    border-color: #c9bfb1;
    background: #faf7f2;
    outline: none;
}

.rou-glist-add.is-added {
    border-color: #166534;
    background: #dcfce7;
    color: #166534;
}

.rou-glist-add__icon {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.rou-glist-add.is-added .rou-glist-add__icon {
    /* The plus becomes a tick without a second icon dependency. */
    font-size: 0;
}

.rou-glist-add.is-added .rou-glist-add__icon::before {
    content: "\2713";
    font-size: 14px;
}

/* ---------- sticky bar ---------- */

.rou-glistbar {
    position: fixed;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    background: #1c1917;
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.28);
}

.rou-glistbar[hidden] {
    display: none !important;
}

.rou-glistbar__count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fafaf9;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.rou-glistbar__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: #d90f32;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.rou-glistbar__show {
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #1c1917;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.rou-glistbar__show:hover,
.rou-glistbar__show:focus-visible {
    background: #f3efe9;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ---------- pay help trigger ---------- */

.rou-gpay-trigger {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #e5ded4;
    border-radius: 999px;
    background: #ffffff;
    color: #57534e;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.rou-gpay-trigger:hover,
.rou-gpay-trigger:focus-visible {
    border-color: #c9bfb1;
    color: #1c1917;
    outline: none;
}

/* ---------- fullscreen "Show to waiter" ---------- */

.rou-gshow,
.rou-gpay {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.rou-gshow::backdrop,
.rou-gpay::backdrop {
    background: rgba(28, 25, 23, 0.55);
}

.rou-gshow__panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 16px;
    background: #ffffff;
    color: #1c1917;
}

.rou-gshow__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e7e5e4;
}

.rou-gshow__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.rou-gshow__close,
.rou-gpay__close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #e7e5e4;
    border-radius: 8px;
    background: #ffffff;
    color: #57534e;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.rou-gshow__close:focus-visible,
.rou-gpay__close:focus-visible {
    outline: 2px solid #1c1917;
    outline-offset: 2px;
}

.rou-gshow__hint {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #57534e;
}

.rou-gshow__list {
    flex: 1 1 auto;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    -webkit-overflow-scrolling: touch;
}

.rou-gshow__row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f4;
}

/* This screen is read at arm's length by someone holding a phone out, so the
   dish name is display size rather than body size. */
.rou-gshow__name {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.rou-gshow__original {
    font-size: 20px;
    font-weight: 500;
    color: #57534e;
}

.rou-gshow__empty {
    flex: 1 1 auto;
    margin: 0;
    font-size: 14px;
    color: #78716c;
}

.rou-gshow__foot {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e7e5e4;
}

.rou-gshow__ghost,
.rou-gshow__primary {
    flex: 1 1 0;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.rou-gshow__ghost {
    border: 1px solid #e5ded4;
    background: #ffffff;
    color: #57534e;
}

.rou-gshow__primary {
    border: 1px solid #1c1917;
    background: #1c1917;
    color: #ffffff;
}

/* ---------- pay help + split ---------- */

.rou-gpay__panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    width: min(440px, calc(100% - 32px));
    margin: 8vh auto 0;
    padding: 20px;
    border-radius: 12px;
    background: #ffffff;
    color: #1c1917;
    box-shadow: 0 20px 48px rgba(28, 25, 23, 0.24);
}

.rou-gpay__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rou-gpay__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.rou-gpay__body {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #57534e;
}

.rou-gpay__split {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid #e7e5e4;
}

.rou-gpay__split-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.rou-gpay__split-body {
    margin: 4px 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #57534e;
}

.rou-gpay__stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rou-gpay__step {
    width: 44px;
    height: 44px;
    border: 1px solid #e5ded4;
    border-radius: 8px;
    background: #ffffff;
    color: #1c1917;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.rou-gpay__people {
    min-width: 44px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.rou-gpay__each {
    margin: 12px 0 0;
    font-size: 20px;
    font-weight: 700;
    color: #166534;
}

.rou-gpay__each[hidden] {
    display: none !important;
}

@media (min-width: 720px) {
    .rou-gshow__panel {
        width: min(560px, 100% - 32px);
        height: auto;
        max-height: calc(100% - 64px);
        margin: 32px auto;
        border-radius: 12px;
        box-shadow: 0 20px 48px rgba(28, 25, 23, 0.24);
    }
}

@media (prefers-reduced-motion: reduce) {
    .rou-glist-add {
        transition: none;
    }
}

/* Closed-hours badge beside the call button (D-355). Deliberately quiet: it
   informs the guest, it does not warn them, and it never mentions a plan. */
.rou-rhome-closed-badge {
    margin: 8px 0 0;
    padding: 8px 12px;
    border-left: 3px solid #b45309;
    border-radius: 8px;
    background: #fffbeb;
    color: #78350f;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}
