/* 設定權限分層(public/settings-own-ui.js):設定頁平台欄位的隱藏與狀態列、正在設定某家店的提示條、管理 ▾ →「平台管理 → 店家詳細參數」(#sp-root;頁面外框在 admin-console.css)。
 * 版面元件(卡片、按鈕列、表格、徽章)沿用 plan-ui.css 的 .pl- 系列,這裡只放自己用到的幾條,只用 .own- / #own- / #sp- 開頭的名字。
 * 商米舊 WebView 守則同 app.css:橫排用 margin 隔開、不靠 flex gap;不用 grid、:has()、:is()、min()、clamp()。觸控區一律 >= 44px。 */

/* 平台才能按的鈕收起來、平台才能改的欄位與只服務它們的說明整格藏起來(作者樣式的 display 會蓋掉 [hidden],所以用 !important) */
.own-off, .own-hide { display: none !important; }
/* 卡片標題列「i 說明」/ 只剩 i 的那一排:裡面的說明都屬平台、被收起來時整列不顯示(settings-own-ui.js tidyHintFolds) */
#tab-settings .set-card > h3.srow-h3-i.own-noi, #tab-settings .inline.srow-ionly.own-noi { display: none; }
/* 看得到但不能改的欄位(統編、公司抬頭):底色灰一點,游標顯示不能改 */
.own-ro input, .own-ro select, .own-ro textarea { background: #f1f3f6; cursor: not-allowed; }

/* 卡片上方的狀態列 */
.own-strip { margin: 6px 0 10px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: #f1f3f6; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.own-strip b { font-weight: 800; }
.own-strip-ic { margin-right: 4px; }
.own-strip-why { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.own-strip.lv-ok { background: #e7f5ea; border-color: #b7e1c1; }
.own-strip.lv-warn { background: #fff7ed; border-color: #fdba74; }
.own-strip.lv-bad { background: #fdecea; border-color: #f5b5ae; }
/* 狀態列裡的「怎麼開通 / 聯絡平台」收摺區 */
.own-help { margin-top: 6px; }
.own-help > summary { min-height: 44px; padding: 8px 0; cursor: pointer; font-weight: 700; color: var(--brand, #c2410c); }
.own-help-b { padding: 2px 0 6px; font-size: 13.5px; line-height: 1.7; }
.own-help-b ul, .own-help-b ol { margin: 2px 0 6px; padding-left: 20px; }
.own-help-t { margin-top: 6px; font-weight: 800; }
.own-help-n { margin: 4px 0; color: var(--muted); }
.own-contact { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.own-hours { display: block; margin: 2px 0 4px; color: var(--muted); }
.own-ct-row { margin-top: 2px; }
.own-ct { display: inline-block; color: inherit; min-height: 44px; margin: 4px 8px 4px 0; padding: 10px 14px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }

/* 狀態燈 */
.own-lamp { display: inline-block; vertical-align: middle; white-space: normal; }
.own-lamp > i { display: inline-block; width: 11px; height: 11px; margin-right: 6px; border-radius: 50%; background: #b8bfcc; vertical-align: middle; }
.own-lamp.lv-ok > i { background: #2f9e44; }
.own-lamp.lv-warn > i { background: #f59f00; }
.own-lamp.lv-bad > i { background: var(--warn); }
.own-lamp > span { vertical-align: middle; font-size: 13px; }
.own-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* 正在設定某家店:頂列下面的提示條(在版面流裡,不蓋住分頁列) */
.own-params-bar { flex-shrink: 0; padding: 6px 14px; background: #1c2333; color: #fff; font-size: 14px; line-height: 1.6; text-align: center; }
.own-params-bar .own-pb-t { display: inline-block; margin: 4px 10px 4px 0; vertical-align: middle; }
.own-params-bar button { min-height: 44px; vertical-align: middle; }

/* 店家詳細參數頁 */
.own-co-line { margin: 2px 0 6px; font-size: 14px; line-height: 1.7; }
/* 每家公司的兩個開關並排在同一列(說明在頁首「兩個開關是什麼意思」一份),窄螢幕自動換行 */
.own-chks { display: flex; flex-wrap: wrap; margin: 2px 0 6px; }   /* 舊 WebView 不支援 flex gap:兩個開關之間的距離用 .own-chk 的右邊界 */
.own-chk { display: block; min-height: 44px; margin: 0 22px 0 0; font-size: 14.5px; font-weight: 700; line-height: 1.6; }
.own-chk input { width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: middle; }
.own-chk small { display: block; font-weight: 400; }
.own-tbl td { white-space: normal; min-width: 92px; }
.own-tbl td.own-st { min-width: 110px; }
.own-tbl td.own-act { text-align: right; }
.own-tbl td.own-act button { min-height: 44px; white-space: nowrap; }
.own-tbl tr.own-off-store td { color: var(--muted); }
/* 表格每一格(與公司那一行的 LINE 官方帳號)是一顆鈕:點下去看細節 */
.own-cell { display: block; width: 100%; min-height: 44px; margin: 0; padding: 6px 8px; box-sizing: border-box; border: 1px solid transparent; border-radius: 8px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.own-cell:hover, .own-cell:focus-visible { border-color: var(--line); background: #f6f7f9; }
.own-co-line .own-cell { display: inline-block; width: auto; max-width: 100%; }
.own-more { display: block; margin-top: 2px; color: var(--brand, #c2410c); font-size: 12px; font-weight: 700; }
.own-co-line .own-more { display: inline; margin: 0 0 0 8px; }
/* 細節視窗 */
.own-dt { font-size: 14.5px; line-height: 1.7; overflow-wrap: anywhere; }
.own-dt-st { margin: 0 0 8px; font-weight: 700; }
.own-dt-st .own-lamp > span { font-size: 15px; }
.own-dt-items { margin: 0 0 8px; padding-left: 22px; }
.own-dt-items li { margin: 0 0 10px; }
.own-dt-fix { margin: 4px 0 8px; padding: 6px 10px; border-radius: 8px; background: #fff7ed; }
.own-dt-t { margin: 10px 0 2px; font-weight: 800; }
.own-dt ul, .own-dt ol { margin: 2px 0 6px; }
.own-dt .pl-sub { margin: 4px 0; }
.own-edit { border-color: #1c2333; }
.own-edit-list { margin: 8px 0 0; padding: 0; list-style: none; }
.own-edit-list li { min-height: 44px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.6; }
.own-edit-list li button { min-height: 44px; margin-left: 6px; vertical-align: middle; }
.own-audit { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.own-fields { margin: 0 0 6px; }
.own-fld { display: block; margin: 0 0 8px; font-size: 14px; }
.own-fld > span { display: block; margin: 0 0 3px; font-weight: 700; }
.own-fld select { min-height: 44px; max-width: 100%; font-size: 14px; }
.own-acts { margin: 0 0 8px; }
.own-fld input[type="url"], .own-fld input[type="text"], .own-fld textarea { width: 100%; max-width: 560px; min-height: 44px; box-sizing: border-box; font-size: 14px; }
.own-fld textarea { min-height: 80px; line-height: 1.6; }
.own-gd-item { margin: 0 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }

/* 手機與平板直放(iPad 768~834 也算):表格改成一家店一張小卡,各串接一行(頁面不橫向晃;表格排版在這個寬度會被捲動框切掉最右邊的「設定這家店」) */
@media (max-width: 900px) {
  .own-tbl thead { display: none; }
  .own-tbl, .own-tbl tbody, .own-tbl tr, .own-tbl td { display: block; width: 100%; box-sizing: border-box; }
  .own-tbl tr { margin: 0 0 10px; padding: 6px 0; border: 1px solid var(--line); border-radius: 10px; }
  .own-tbl td { min-width: 0; padding: 4px 10px; border-bottom: 0; }
  .own-tbl td[data-l]:not([data-l=""])::before { content: attr(data-l); display: inline-block; min-width: 84px; margin-right: 6px; color: var(--muted); font-size: 12.5px; font-weight: 700; }
  .own-tbl td.own-st::before { display: none !important; }
  .own-tbl td.own-act { text-align: left; }
  .own-tbl .own-cell { display: inline-block; width: auto; max-width: calc(100% - 96px); vertical-align: middle; }
}
