/* Foody-Go M-08 (20261029) - order details card (yellow frame), compact goods rows, separated Repeat/Back.
 * STATUS: подготовлено. Mobile only. Hooks: fgm-oc-* classes in module/account_history_info.html working copy.
 * The same .fgm-oc-part rules style M-07's inline details (".fgm-oh-details" in account_history), so both look alike.
 * Repeat-order form/button (#cart_quantity / #add_to_cart1) and BUTTON_BACK keep their existing behaviour.
 * Include after r10/info in css/css.php:
 *   <link rel="stylesheet" href="/templates/FoodyGoCart/mobile-order-card-20261029-m08.css" media="screen"> */
@media screen and (max-width: 767px){
  /* --- card frame: the three .page blocks form ONE continuous yellow-framed card --- */
  .fgm-oc-part{box-sizing:border-box;min-width:0;max-width:100%;margin:0!important;padding:14px 16px!important;
    background:#fffdf5;border-left:2px solid #ffbf24;border-right:2px solid #ffbf24;border-radius:0;
    font-size:14px;line-height:1.5;color:#20211f;overflow-wrap:anywhere;word-break:normal}
  .fgm-oc-part.fgm-oc-first{border-top:2px solid #ffbf24;border-radius:16px 16px 0 0;padding-top:16px!important}
  .fgm-oc-part.fgm-oc-last{border-bottom:2px solid #ffbf24;border-radius:0 0 16px 16px;padding-bottom:16px!important}
  .fgm-oc-part.fgm-oc-first.fgm-oc-last{border-radius:16px}
  .fgm-oc-part + .fgm-oc-part{border-top:1px dashed #efd58a}
  .fgm-oc-part .pagecontent{margin:0;padding:0;border:0;background:none;box-shadow:none}
  .fgm-oc-part p{margin:0 0 6px}
  .fgm-oc-part .bold{font-weight:700}
  .fgm-oc-subtitle{margin:0 0 10px!important;font-size:15px;font-weight:800}
  .fgm-oc-number{font-size:16px;font-weight:800}
  .fgm-oc-info dl.ordersAddress{float:none;width:auto;margin:10px 0 0;padding:0}
  .fgm-oc-info dl.ordersAddress dt:empty{display:none}
  .fgm-oc-info dl.ordersAddress dd{margin:0;padding:0}
  .fgm-oc-info > .pagecontent > br{display:none}
  .fgm-oc-shipping,.fgm-oc-payment{margin-top:10px!important}
  .fgm-oc-part table{width:100%!important;max-width:100%;border-collapse:collapse}
  /* --- goods: compact cards instead of the cramped 6-column table (all fields kept, incl. product code) --- */
  .fgm-oc-products,.fgm-oc-products > tbody{display:block;width:100%!important}
  .fgm-oc-products .fgm-oc-thead{display:none}
  .fgm-oc-products .fgm-oc-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;
    grid-template-areas:"name name name" "qty single sum" "model model model";gap:4px 10px;align-items:baseline;
    padding:10px 0;border-bottom:1px solid #f1e6c3}
  .fgm-oc-products .fgm-oc-row:last-child{border-bottom:0}
  .fgm-oc-products .fgm-oc-row > td{display:block;width:auto!important;min-width:0;padding:0;border:0;text-align:left}
  .fgm-oc-products .fgm-oc-name{grid-area:name;font-size:14px;line-height:1.4}
  .fgm-oc-products .fgm-oc-name em{display:block;font-style:normal;font-size:12px;color:#5f6158}
  .fgm-oc-products .fgm-oc-row > .fgm-oc-x{display:none}
  .fgm-oc-products .fgm-oc-qty{grid-area:qty;white-space:nowrap}
  .fgm-oc-products .fgm-oc-qty::after{content:' \00D7'}
  .fgm-oc-products .fgm-oc-single{grid-area:single;white-space:nowrap;color:#4b4d45}
  .fgm-oc-products .fgm-oc-sum{grid-area:sum;white-space:nowrap;text-align:right;font-weight:800}
  .fgm-oc-products .fgm-oc-model{grid-area:model;font-size:12px;color:#6b6d63}
  .fgm-oc-products .fgm-oc-model::before{content:attr(data-label) ': '}
  .fgm-oc-products .fgm-oc-model em{font-style:normal}
  /* --- totals: right aligned, grand total highlighted (values untouched) --- */
  .fgm-oc-totals{margin-top:6px}
  .fgm-oc-totals td{white-space:normal!important;padding:3px 0!important;text-align:right}
  .fgm-oc-totals td > div{text-align:right}
  .fgm-oc-totals .fgm-oc-grand td{padding-top:10px!important;border-top:1px solid #efd58a;font-size:17px;font-weight:800}
  /* --- actions: separate, aligned, equal width, >=44px, 14px gap; clear of the fixed bottom nav --- */
  .fgm-oc-actions{display:flex!important;flex-direction:column;align-items:stretch;gap:14px;float:none;
    margin:18px 0 calc(24px + env(safe-area-inset-bottom))!important;padding:0!important;clear:both}
  .fgm-oc-actions > span{display:block;float:none!important;width:100%;margin:0!important;text-align:center}
  .fgm-oc-actions form{display:block!important;width:100%;margin:0}
  .fgm-oc-actions #add_to_cart1{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:8px;
    width:100%;min-height:48px;margin:0;padding:12px 16px;border:1px solid #efbb38;border-radius:12px;
    background:#ffbf24;color:#20211f;font:800 15px/1.25 FGManrope,Arial,sans-serif;text-shadow:none;box-shadow:none;white-space:normal}
  .fgm-oc-actions #add_to_cart1 > span{display:inline;margin:0;padding:0;border:0;background:none;box-shadow:none;
    color:#20211f!important;font:inherit;text-shadow:none}
  .fgm-oc-actions #add_to_cart1 i{color:#20211f!important}
  .fgm-oc-back > a{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;
    margin:0;padding:12px 16px;border:1px solid #d7dbcf;border-radius:12px;background:#fff;color:#363a30;
    font:700 15px/1.25 FGManrope,Arial,sans-serif;text-decoration:none;box-shadow:none}
  .fgm-oc-back > a img{display:none}
  .fgm-oc-back > a > span{display:inline;width:auto;min-height:0;margin:0;padding:0;border:0;border-radius:0;
    background:none;box-shadow:none;color:inherit;font:inherit;text-shadow:none}
  .fgm-oc-actions #add_to_cart1:focus-visible,.fgm-oc-back > a:focus-visible{outline:3px solid #b88112;outline-offset:3px}
  .fgm-oc-actions + .clear{height:0}
}
