/* Call Waiter (docs/thai-scope/m2-02). Arabic is `html[lang=ar] body { direction: rtl }`, not dir="rtl". */

.call-waiter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #dadbe1;
    border-radius: 5px;
    background-color: #fff;
    color: #000;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

.call-waiter-btn i {
    color: var(--main_color);
}

.call-waiter-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* Home header: next to the language switch, or alone at the end of the header. A wide logo shrinks
   instead of pushing the buttons off a phone screen. */
.digital-menu-head.has-call-waiter {
    gap: 12px;
}

.digital-menu-head.has-call-waiter .logo {
    min-width: 0;
}

.digital-menu-head.has-call-waiter .logo img {
    max-width: 100%;
    object-fit: contain;
}

.call-waiter-head-actions {
    flex-shrink: 0;
    gap: 8px;
}

.call-waiter-btn--header {
    white-space: nowrap;
}

@media (max-width: 420px) {
    .digital-menu-head.has-call-waiter {
        padding-right: 16px;
        padding-left: 16px;
    }

    .digital-menu-head .call-waiter-btn--header {
        padding: 6px 8px;
        font-size: 12px;
    }
}

/* Cart, Place Order and checkout: a second, outlined button under the main action. */
.call-waiter-btn--below-action {
    width: 100%;
    min-height: 48px;
    margin-top: 12px;
    border-radius: 5px;
    font-size: 15px;
}

/* Non-blocking message, at the top so it never covers the order and payment buttons. */
.call-waiter-toast {
    position: fixed;
    top: 12px;
    left: 50%;
    z-index: 2100;
    width: calc(100% - 24px);
    max-width: 520px;
    padding: 12px 16px;
    border-radius: 8px;
    background-color: #1f7a4d;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    visibility: hidden;
    opacity: 0;
    transform: translate(-50%, -10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.call-waiter-toast.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
}

.call-waiter-toast--info {
    background-color: #2b4c7e;
}

.call-waiter-toast--warning {
    background-color: #9a3412;
}

.call-waiter-toast__message,
.call-waiter-toast__table {
    display: block;
}

.call-waiter-toast__table:empty {
    display: none;
}

.call-waiter-toast__change {
    margin-top: 6px;
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

/* The table number field of a general QR. */
.call-waiter-sheet {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    display: none;
}

.call-waiter-sheet.is-open {
    display: block;
}

.call-waiter-sheet__backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Near the top of the screen: a bottom sheet would sit under the phone keyboard. */
.call-waiter-sheet__panel {
    position: relative;
    max-width: 420px;
    margin: 15vh auto 0;
    padding: 20px;
    border-radius: 12px;
    background-color: #fff;
}

@media (max-width: 450px) {
    .call-waiter-sheet__panel {
        margin-right: 16px;
        margin-left: 16px;
    }
}

.call-waiter-sheet__title {
    margin-bottom: 14px;
    color: #000;
    font-size: 18px;
    font-weight: 700;
}

.call-waiter-sheet__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.call-waiter-sheet__error {
    margin-top: 8px;
    color: #c40000;
    font-size: 13px;
}

.call-waiter-sheet__error:empty {
    display: none;
}

.call-waiter-sheet__actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.call-waiter-sheet__actions button {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--main_color);
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.call-waiter-sheet__send {
    background-color: var(--main_color);
    color: #fff;
}

.call-waiter-sheet__send:disabled {
    opacity: 0.6;
}

.call-waiter-sheet__cancel {
    background-color: #fff;
    color: #000;
}
