/* Maruorder item screens: fixes from the 17 Nov staff-screen audit (1-3).
   Loaded after restaurant_style.css by the item detail page. Sizes in px so the
   tablet root font (125%+) does not blow them up; no transform: scale anywhere. */

.mo-lbl {
    display: block;
    margin: 0 0 4px 14px;
    font-size: 13px;
    line-height: 1.4;
    color: #555;
    font-weight: 600;
    text-align: left;
}
.mo-err {
    display: none;
    margin: 6px 0 0 14px;
    font-size: 13px;
    line-height: 1.4;
    color: #d93025;
    font-weight: 600;
    text-align: left;
}

/* Option window (項目を作成) */
.layer-other .top-bar .top-page-ti { text-align: center; }
.layer-other .select-box-b h3 { font-size: 14px; }
.layer-other .select-box-b label {
    display: flex;
    align-items: center;
    min-height: 44px;
}
.layer-other .select-box-b .mo-type {
    flex: 1;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
}
.layer-other .select-box-b .mo-type small {
    display: block;
    font-size: 12px;
    color: #888;
    font-weight: normal;
}
.layer-other .mo-choice-head {
    display: flex;
    justify-content: space-between;
    padding: 0 6% 0 6%;
    margin: 8px 0 -4px 0;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    background: none;
    min-height: 0;
}
.layer-other .mo-choice-head span:last-child { width: 32%; text-align: center; }
.layer-other #errOptions { margin: 0 6% 8px 6%; }
.layer-other #otheroptionlist .pinkAtten { margin-top: 4px; }

/* Touch targets: 編集 / 削除 on an option, sort arrows, delete row */
.menu-details-form .menu-form-reset {
    display: inline-block;
    min-width: 44px;
    min-height: 44px;
    line-height: 44px;
    text-align: center;
}

.menu-details-form .food-details-ac.div-input { height: auto; min-height: 8rem; overflow: hidden; padding-bottom: 4px; }
.food-details-ac .sort-prev, .food-details-ac .sort-next {
    width: 44px;
    height: 44px;
    margin-left: 8px;
}
.fooddetail-edit #btnAddProperty, .layer-other #btnAddOption {
    min-height: 44px;
    height: auto;
    line-height: 44px;
}

/* Tablets and desktop: the old style shrank the whole screen to 70 %. */
@media only screen and (min-width: 961px) {
    .fooddetail-edit {
        transform: none;
        max-width: 640px;
        margin: 0 auto;
        padding-top: 96px;
    }
    .fooddetail-edit .menu-details-form input,
    .fooddetail-edit .menu-details-form select {
        font-size: 16px;
        height: 52px;
        box-sizing: border-box;
    }
    .fooddetail-edit .menu-details-form .div-input textarea { font-size: 16px; min-height: 110px; height: 110px; padding: 12px 0; }
    .fooddetail-edit .mo-lbl, .fooddetail-edit .mo-err { font-size: 15px; margin-left: 16px; }
    .fooddetail-edit .menu-th-img { width: 120px; height: 120px; }
    .fooddetail-edit .menu-th-img p { left: 0; width: 100%; top: 28px; height: auto; font-size: 16px; padding-top: 36px; background-size: 30px; }
    .fooddetail-edit .food-details-ac { padding-top: 12px; padding-bottom: 8px; }
    .fooddetail-edit .menu-details-form > li { margin-bottom: 16px; }
    .fooddetail-edit .food-sec-name,
    .fooddetail-edit .food-sec-name .small-tags { font-size: 14px; }
    .fooddetail-edit .menu-details-form .div-input .menu-form-reset { font-size: 15px; margin-right: 12px; }
    .fooddetail-edit .menu-details-form .div-input .small-tags { font-size: 13px; }
    .fooddetail-edit #btnAddProperty {
        font-size: 14px;
        min-height: 44px;
        line-height: 44px;
    }
    .layer-other .mo-lbl, .layer-other .mo-err, .layer-other .select-box-b h3 { font-size: 16px; }
    .layer-other .select-box-b .mo-type { font-size: 18px; }
    .layer-other .select-box-b .mo-type small { font-size: 14px; }
    .layer-other .mo-choice-head { font-size: 16px; }
}

/* ---------- 商品一覧 (fixes 4 and 5) ---------- */
.member-menu-list .mo-state {
    padding: 8px 4% 4px 4%;
    text-align: left;
    clear: both;
}
.member-menu-list .mo-state-lbl {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin: 0 0 4px 4px;
}
.member-menu-list .mo-state-sel {
    width: 100%;
    min-height: 44px;
    padding: 0 40px 0 16px;
    border: 1px solid #FAAE01;
    border-radius: 22px;
    background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2307033F' stroke-width='2'/%3E%3C/svg%3E") right 16px center no-repeat;
    -webkit-appearance: none;
    appearance: none;
    font-size: 15px;
    font-weight: 600;
    color: #07033F;
    box-sizing: border-box;
}
.member-menu-list li[data-state="today"] .mo-state-sel,
.member-menu-list li[data-state="stop"] .mo-state-sel { border-color: #d93025; color: #d93025; }
.member-menu-list li[data-state="hidden"] .mo-state-sel { border-color: #888; color: #555; }
.member-menu-list .mo-state-help {
    margin: 4px 0 0 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #666;
}
.member-menu-list .mo-new-row { min-height: 44px; line-height: 44px; }
/* not on sale: only the photo and name are dimmed; the 状態 box says why */
.member-menu-list li.mo-off .menu-item-d { opacity: .5; }

.member-menu-list .mo-open { cursor: pointer; }

.member-menu-list .menu-bn-bar { display: flex; align-items: center; justify-content: space-between; }
.mo-more {
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 22px;
    background: #fff;
    color: #333;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
}
.mo-more-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.mo-more-menu {
    display: none;
    line-height: 0;
}
.mo-more-menu button { margin: 4px 8px 4px 0; vertical-align: middle; }
.mo-more-menu .mo-top, .mo-more-menu .mo-bottom {
    min-height: 44px;
    margin-right: 8px;
    padding: 0 12px;
    border: 1px solid #07033F;
    border-radius: 22px;
    background: #fff;
    color: #07033F;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.mo-more-menu .mo-del {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #d93025;
    border-radius: 22px;
    background: #fff;
    color: #d93025;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* Undo toast (one for the whole page) */
#mo-toast {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
    z-index: 9998;
    display: none;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto;
    padding: 10px 12px 10px 16px;
    border-radius: 10px;
    background: #222;
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}
#mo-toast .mo-toast-text { flex: 1; }
#mo-toast .mo-toast-undo {
    min-height: 44px;
    min-width: 88px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font-size: 15px;
    font-weight: bold;
}

@media only screen and (min-width: 961px) {
    .member-menu-list .mo-state-lbl { font-size: 15px; }
    .member-menu-list .mo-state-sel { font-size: 17px; min-height: 48px; }
    .member-menu-list .mo-state-help { font-size: 14px; }
}

/* ---------- カテゴリ (fix 4) ---------- */
.foodtype-list .menu-bn-bar { display: flex; align-items: center; justify-content: space-between; float: none; width: auto; }
.foodtype-list .menu-bn-bar > div:last-child { float: none; margin-left: auto; }
.foodtype-list .edit-style-1 {
    border-radius: 22px;
    min-width: 64px;
    min-height: 44px;
    line-height: 42px;
    box-sizing: border-box;
    text-align: center;
}
.foodtype-list .mo-cat-name { display: inline-block; max-width: calc(100% - 90px); line-height: 1.4; padding: 10px 0; vertical-align: middle; }

/* ---------- 44 px touch targets on the list and category cards ---------- */
.member-menu-list .menu-bn-bar > div a,
.foodtype-list .menu-bn-bar > div a {
    width: 44px;
    height: 44px;
    margin-left: 12px;
    box-sizing: border-box;
    background-size: 18px;
}
.member-menu-list .menu-item-th-mark .item-copy-a {
    min-height: 44px;
    line-height: 40px;
    box-sizing: border-box;
    padding-top: 0;
    padding-bottom: 0;
}
.member-menu-list .menu-item-d > div > p a {
    display: inline-block;
    min-width: 44px;
    min-height: 44px;
    line-height: 44px;
    text-align: center;
}
.member-menu-list.menu-lists .mo-new-row .a-point { transform: none; }
.member-menu-list .mo-new-row .a-point { width: 68px; height: 40px; border-radius: 20px; box-sizing: border-box; vertical-align: middle; }
.member-menu-list .mo-new-row .a-point i { width: 32px; height: 32px; top: 3px; left: 3px; box-sizing: border-box; }
.member-menu-list .mo-new-row .a-point-on i { left: auto; right: 3px; }
.member-menu-list .mo-new-row { display: flex; align-items: center; justify-content: space-between; }

/* ---------- メニュー設定 (small fixes) ---------- */
#foodbooklist .mo-book-off { display: none; font-size: 13px; line-height: 1.5; color: #d93025; font-weight: 600; margin: 4px 0 8px 0; }
#foodbooklist li.menu-Disable .mo-book-off { display: block; }
/* main action = navy with orange text, copy = navy outline */
#foodbooklist p.menu-bn-bar { display: flex; gap: 8px; }
#foodbooklist .menu-bn-bar a.menu-a-new, #foodbooklist .menu-bn-bar a.menu-a-copy { font-size: 13px; flex: 1 1 0; width: auto; float: none; margin: 0; padding: 4px 6px; display: flex; align-items: center; justify-content: center; line-height: 1.3 !important; text-align: center; overflow: visible; }
#foodbooklist .menu-bn-bar a.menu-a-new {
    background: #07033F;
    color: #FAAE01;
    border-color: #07033F;
    min-height: 44px;
    line-height: 44px;
    height: auto;
    text-align: center;
    padding: 0 8px;
}
#foodbooklist .menu-bn-bar a.menu-a-copy {
    background: #fff;
    color: #07033F;
    border: 1px solid #07033F;
    min-height: 44px;
    line-height: 42px;
    height: auto;
    box-sizing: border-box;
}
#foodbooklist .menu-preview-a { min-height: 44px; line-height: 42px; box-sizing: border-box; }
#foodbooklist .a-point { width: 68px; height: 40px; border-radius: 20px; box-sizing: border-box; transform: none; vertical-align: middle; }
#foodbooklist .a-point i { width: 32px; height: 32px; top: 3px; left: 3px; box-sizing: border-box; }
#foodbooklist .a-point-on i { left: auto; right: 3px; }
.mo-ai-entry {
    display: block;
    width: 84%;
    max-width: 420px;
    margin: 16px auto 0 auto;
    padding: 10px 16px;
    border: 1px solid #07033F;
    border-radius: 24px;
    text-align: center;
    color: #07033F;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    box-sizing: border-box;
    text-decoration: none;
}
.mo-ai-entry small { display: block; font-size: 12px; font-weight: normal; color: #555; }

@media only screen and (min-width: 961px) {
    #foodbooklist.date-details-lst.menu-lists { box-sizing: border-box; max-width: 94%; }
}

/* ---------- 25 Nov: card actions and toolbar (George's iPhone screenshot) ----------
   Card bottom bar: ∧ ∨ on the left, 「…」 on the right. 「…」 opens a pop-up menu above the button
   (一番上へ / 一番下へ / この商品を削除) instead of spilling buttons into the card. */
.member-menu-list li { overflow: visible; }
.member-menu-list .menu-bn-bar { overflow: visible; gap: 8px; min-height: 52px; }
.member-menu-list .menu-bn-bar > div:not(.mo-more-wrap) { order: 1; float: none; display: flex; align-items: center; gap: 12px; }
.member-menu-list .menu-bn-bar > div:not(.mo-more-wrap) a { margin: 0; float: none; }
.member-menu-list .mo-more-wrap { order: 2; margin-left: auto; position: relative; flex: 0 0 auto; display: block; }
.member-menu-list .mo-more { min-width: 52px; border-color: #07033F; color: #07033F; letter-spacing: 1px; }
.member-menu-list .mo-more-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    z-index: 60;
    min-width: 210px;
    padding: 6px 0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .06);
    line-height: normal;
    text-align: left;
}
.member-menu-list .mo-more-menu button,
.member-menu-list .mo-more-menu .mo-top,
.member-menu-list .mo-more-menu .mo-bottom,
.member-menu-list .mo-more-menu .mo-del {
    display: block;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
}
.member-menu-list .mo-more-menu button:active { background: #f2f2f2; }
.member-menu-list .mo-more-menu .mo-del { margin-top: 6px; border-top: 1px solid #eee; color: #d93025; font-weight: 600; }

/* Toolbar under the title: one row on tablets, two tidy rows on phones (no wrapped 受取時間) */
#foodlist ~ .select-types, .select-types { box-sizing: border-box; }
.select-types {
    display: grid;
    grid-template-columns: minmax(140px, 1.4fr) 1fr 1fr 1fr;
    align-items: center;
    gap: 8px;
    padding: 8px 12px !important;
    width: 100% !important;
}
.select-types select.select-s-a { width: 100%; float: none; margin: 0; height: 44px; line-height: 44px; }
.select-types .add-menu-item,
.select-types .gongying-shijian {
    float: none;
    width: auto;
    min-height: 44px;
    height: auto;
    margin: 0;
    padding: 4px 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #07033F;
    border-radius: 22px;
    background: #fff;
    color: #07033F;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}
.select-types .add-menu-item i { display: none; }
.select-types #btnAddNew::before { content: "＋ "; }
.select-types .gongying-shijian { font-weight: 600; font-size: 11px; }
.select-types .gongying-shijian b { font-size: 12px; font-weight: 700; }
.select-types .gongying-shijian br { display: none; }
.select-types #btnAiMenu { order: 2; }
.select-types #btnAddNew { order: 3; }
.select-types .gongying-shijian { order: 4; }
@media (max-width: 599px) {
    .select-types { grid-template-columns: 1fr 1fr 1fr; }
    .select-types select.select-s-a { grid-column: 1 / -1; }
}
.select-types .add-menu-item { flex-direction: row; gap: 2px; }

/* same card actions on カテゴリ */
.foodtype-list li { overflow: visible; }
.foodtype-list .menu-bn-bar { overflow: visible; gap: 8px; min-height: 52px; }
.foodtype-list .menu-bn-bar > div:not(.mo-more-wrap) { order: 1; float: none; display: flex; align-items: center; gap: 12px; margin-left: 0; }
.foodtype-list .menu-bn-bar > div:not(.mo-more-wrap) a { margin: 0; float: none; }
.foodtype-list .mo-more-wrap { order: 2; margin-left: auto; position: relative; flex: 0 0 auto; display: block; }
.foodtype-list .mo-more { min-width: 52px; border-color: #07033F; color: #07033F; letter-spacing: 1px; }
.foodtype-list .mo-more-menu {
    position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 60; min-width: 210px; padding: 6px 0;
    border-radius: 12px; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .06);
    line-height: normal; text-align: left;
}
.foodtype-list .mo-more-menu button, .foodtype-list .mo-more-menu .mo-top, .foodtype-list .mo-more-menu .mo-bottom, .foodtype-list .mo-more-menu .mo-del {
    display: block; width: 100%; min-height: 48px; margin: 0; padding: 0 18px; border: 0; border-radius: 0;
    background: #fff; color: #1a1a1a; font-size: 16px; font-weight: 500; text-align: left;
}
.foodtype-list .mo-more-menu button:active { background: #f2f2f2; }
.foodtype-list .mo-more-menu .mo-del { margin-top: 6px; border-top: 1px solid #eee; color: #d93025; font-weight: 600; }
