/* 注文ごとの「お客様とのやり取り」（public/order-messages.js）
   配色はサイト共通の変数を使う。商品・カート・決済の見た目には影響しない。 */

.om-btn{display:inline-flex;align-items:center;gap:6px;font-family:'Noto Sans JP',sans-serif;font-weight:600;cursor:pointer;border-radius:6px;line-height:1.4}
.om-btn-admin{font-size:.75rem;padding:4px 12px;color:var(--espresso,#1C0E06);background:#fff;border:1px solid var(--border,#E0CEAD)}
.om-btn-member{font-size:.8rem;padding:8px 14px;margin-top:12px;color:var(--caramel,#8B5523);background:var(--parchment,#F9F2E5);border:1px solid var(--border,#E0CEAD)}
.om-btn:hover{background:var(--cream,#F2E8D5)}
.om-btn.om-has-unread{border-color:#c0471a}
.om-badge{display:inline-block;font-size:.68rem;font-weight:700;padding:1px 7px;border-radius:999px;background:var(--cream,#F2E8D5);color:var(--caramel,#8B5523);white-space:nowrap}
.om-badge[hidden]{display:none}
.om-badge-unread{background:#c0471a;color:#fff}

.om-inbox{background:#fff6f1;border:1px solid #f0c4b0;border-radius:10px;padding:12px 14px;margin-bottom:14px;font-size:.84rem;color:#7a2d10}
.om-inbox-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.om-chip{font-family:inherit;font-size:.76rem;font-weight:600;padding:4px 10px;border-radius:999px;border:1px solid #e3a58c;background:#fff;color:#7a2d10;cursor:pointer}
.om-chip:hover{background:#ffe9df}

.om-overlay{position:fixed;inset:0;z-index:9600;background:rgba(28,14,6,.55);display:flex;align-items:center;justify-content:center;padding:16px}
.om-overlay[hidden]{display:none}
.om-modal{background:var(--warm-white,#FDFAF5);width:100%;max-width:620px;height:min(760px,100%);border-radius:14px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 18px 60px rgba(0,0,0,.35);font-family:'Noto Sans JP',sans-serif;color:#342010}
.om-head{display:flex;align-items:flex-start;gap:10px;padding:14px 16px;background:#5C3317;color:#fff}
.om-head-text{flex:1;min-width:0}
.om-title{font-size:.98rem;font-weight:700;color:#EFB96A;word-break:break-all}
.om-sub{font-size:.74rem;line-height:1.6;color:rgba(255,255,255,.82);margin-top:3px;word-break:break-word}
.om-items{color:rgba(255,255,255,.65)}
.om-close,.om-back{background:rgba(255,255,255,.14);color:#fff;border:none;border-radius:8px;cursor:pointer;font-family:inherit;flex-shrink:0}
.om-close{width:34px;height:34px;font-size:1.3rem;line-height:1}
.om-back{height:34px;padding:0 10px;font-size:.8rem}
.om-back[hidden]{display:none}
.om-close:hover,.om-back:hover{background:rgba(255,255,255,.28)}

.om-list{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:14px;background:var(--parchment,#F9F2E5);-webkit-overflow-scrolling:touch}
.om-empty{margin:auto;text-align:center;font-size:.85rem;line-height:1.9;color:#8B6340;padding:20px}
.om-load-error{color:#c0471a}
.om-msg{display:flex;flex-direction:column;max-width:84%}
.om-theirs{align-self:flex-start;align-items:flex-start}
.om-mine{align-self:flex-end;align-items:flex-end}
.om-who{font-size:.7rem;font-weight:700;color:#8B6340;margin-bottom:3px}
.om-bubble{padding:10px 14px;border-radius:14px;font-size:.88rem;line-height:1.75;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}
.om-theirs .om-bubble{background:#fff;border:1px solid var(--border,#E0CEAD);border-top-left-radius:4px}
.om-mine .om-bubble{background:#8B5523;color:#fff;border-top-right-radius:4px}
.om-meta{font-size:.66rem;color:#9a8468;margin-top:4px}
.om-imgs{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.om-mine .om-imgs{justify-content:flex-end}
.om-imgs img{width:112px;height:112px;object-fit:cover;border-radius:10px;border:1px solid var(--border,#E0CEAD);background:#fff;display:block}
.om-internal-msg{align-self:stretch;max-width:100%;align-items:stretch}
.om-internal-msg .om-bubble{background:#fff9db;border:1px dashed #d8b53a;color:#5a4708}
.om-internal-msg .om-who{color:#8a6d0a}

.om-orders{display:flex;flex-direction:column;gap:8px}
.om-order-row{display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:left;width:100%;padding:12px 14px;background:#fff;border:1px solid var(--border,#E0CEAD);border-radius:10px;cursor:pointer;font-family:inherit;font-size:.85rem;color:#342010}
.om-order-row:hover{background:var(--cream,#F2E8D5)}
.om-order-row small{color:#8B6340;font-size:.74rem}
.om-order-stat{font-size:.76rem;color:#8B6340;white-space:nowrap;display:flex;align-items:center;gap:6px}

.om-form{padding:12px 16px 14px;background:#fff;border-top:1px solid var(--border,#E0CEAD)}
.om-form[hidden]{display:none}
.om-form-internal{background:#fffdf0}
.om-text{width:100%;box-sizing:border-box;resize:vertical;min-height:70px;max-height:220px;padding:10px 12px;border:1px solid var(--border,#E0CEAD);border-radius:10px;font-family:inherit;font-size:16px;line-height:1.6;color:#342010;background:#fff}
.om-text:focus{outline:2px solid #EFB96A;outline-offset:1px}
.om-internal{display:flex;align-items:center;gap:6px;font-size:.76rem;color:#6B4A28;margin-top:8px;cursor:pointer}
.om-internal[hidden]{display:none}
.om-actions{display:flex;align-items:center;gap:10px;margin-top:10px}
.om-photo{font-size:.8rem;font-weight:600;color:var(--caramel,#8B5523);border:1px solid var(--border,#E0CEAD);border-radius:8px;padding:8px 12px;cursor:pointer;background:var(--parchment,#F9F2E5)}
.om-photo:hover{background:var(--cream,#F2E8D5)}
.om-count{flex:1;text-align:right;font-size:.72rem;color:#8B6340}
.om-count.om-over{color:#c0471a;font-weight:700}
.om-send{margin-left:auto;background:#8B5523;color:#fff;border:none;border-radius:50px;padding:10px 26px;font-family:inherit;font-size:.88rem;font-weight:700;cursor:pointer}
.om-send:hover{background:#5C3317}
.om-send:disabled{opacity:.6;cursor:default}
.om-error{font-size:.78rem;color:#c0471a;line-height:1.6;margin-top:8px}
.om-error:empty{display:none}
.om-thumbs{display:flex;flex-wrap:wrap;gap:8px}
.om-thumbs:not(:empty){margin-bottom:10px}
.om-thumb{position:relative;display:inline-block}
.om-thumb img{width:64px;height:64px;object-fit:cover;border-radius:8px;border:1px solid var(--border,#E0CEAD);display:block}
.om-thumb button{position:absolute;top:-6px;right:-6px;width:22px;height:22px;border-radius:50%;border:none;background:#342010;color:#fff;font-size:.8rem;line-height:1;cursor:pointer}

@media (max-width:600px){
  .om-overlay{padding:0}
  .om-modal{max-width:none;height:100%;border-radius:0}
  .om-msg{max-width:92%}
  .om-imgs img{width:92px;height:92px}
  .om-actions{flex-wrap:wrap}
}
