/* HayOrder v1.1.74 – Mobile-Popup-Luft, Primäraktion volle Breite, Schließer sauber */

/* =========================================================
   1) BESTELLDETAIL: neutraler, gleichmäßiger Rahmen
   ========================================================= */
body #orders-ajax-root.ho-orders-174.ho59-modal-ready .ho124-detail[data-order-status]:not([hidden]){
  border:1px solid rgba(101,121,141,.38)!important;
  border-top:1px solid rgba(101,121,141,.38)!important;
  border-right:1px solid rgba(101,121,141,.38)!important;
  border-bottom:1px solid rgba(101,121,141,.38)!important;
  border-left:1px solid rgba(101,121,141,.38)!important;
  border-radius:20px!important;
  box-shadow:0 42px 118px rgba(0,0,0,.62),0 8px 24px rgba(0,0,0,.20),0 0 0 1px rgba(255,255,255,.02)!important;
}

body.theme-light #orders-ajax-root.ho-orders-174.ho59-modal-ready .ho124-detail[data-order-status]:not([hidden]){
  border-color:rgba(117,134,152,.40)!important;
  box-shadow:0 34px 92px rgba(16,24,40,.17),0 8px 24px rgba(16,24,40,.08),0 0 0 1px rgba(255,255,255,.62)!important;
}

/* =========================================================
   2) SCHLIESSER: exakt ein X, rund und sauber zentriert
   ========================================================= */
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho56-close-detail{
  display:grid!important;
  place-items:center!important;
  width:42px!important;
  min-width:42px!important;
  height:42px!important;
  min-height:42px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(139,159,179,.34)!important;
  border-radius:50%!important;
  color:#eef3f7!important;
  background:rgba(28,40,52,.92)!important;
  font-size:0!important;
  line-height:0!important;
  text-decoration:none!important;
  box-shadow:none!important;
  overflow:hidden!important;
  transform:none!important;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease!important;
}
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho56-close-detail::before{
  content:"×"!important;
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:25px!important;
  line-height:1!important;
  font-weight:400!important;
  text-align:center!important;
  transform:none!important;
}
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho56-close-detail::after{
  content:none!important;
  display:none!important;
}
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho56-close-detail:hover,
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho56-close-detail:focus-visible{
  border-color:rgba(92,168,242,.68)!important;
  color:#fff!important;
  background:rgba(43,59,74,.98)!important;
  outline:none!important;
  box-shadow:0 0 0 3px rgba(92,168,242,.10)!important;
}
body.theme-light #orders-ajax-root.ho-orders-174 .ho124-detail .ho56-close-detail{
  color:#273746!important;
  background:#f5f8fa!important;
  border-color:#cbd6df!important;
}
body.theme-light #orders-ajax-root.ho-orders-174 .ho124-detail .ho56-close-detail:hover,
body.theme-light #orders-ajax-root.ho-orders-174 .ho124-detail .ho56-close-detail:focus-visible{
  color:#122130!important;
  background:#eaf1f7!important;
  border-color:#8fb7dc!important;
}

/* Auch andere Operator-Popup-Schließer auf das gleiche Prinzip bringen. */
body :is(.ho-new-close,.category-dialog-close,.catalog-editor-close,.extras-modal-close,.ho63-close,.ho-modal-close),
body .ho-res-dialog-head>[data-res-close][aria-label]{
  border-radius:50%!important;
}

/* =========================================================
   3) DESKTOP/LAPTOP: drei Aktionen nebeneinander wie bisher
   ========================================================= */
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-footer-buttons{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-areas:"primary cancel print"!important;
  gap:10px!important;
  width:min(100%,690px)!important;
  margin-left:auto!important;
}
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-primary-form{grid-area:primary!important}
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-cancel-form{grid-area:cancel!important}
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-print-button{grid-area:print!important}
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-footer-buttons > .ho68-primary-form,
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-footer-buttons > .ho68-cancel-form,
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-footer-buttons > .ho68-print-button{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
}
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-footer-buttons > .ho68-primary-form > button,
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-footer-buttons > .ho68-cancel-form > button,
body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-footer-buttons > .ho68-print-button{
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}

/* =========================================================
   4) HANDY: Popup wirklich freigestellt + Primäraktion volle Breite
   ========================================================= */
@media(max-width:760px){
  body #orders-ajax-root.ho-orders-174.ho59-modal-ready .ho124-detail[data-order-status]:not([hidden]){
    position:fixed!important;
    inset:50% auto auto 50%!important;
    top:50%!important;
    left:50%!important;
    right:auto!important;
    bottom:auto!important;
    width:calc(100vw - 32px)!important;
    max-width:calc(100vw - 32px)!important;
    height:auto!important;
    max-height:calc(100dvh - 28px)!important;
    margin:0!important;
    border-radius:18px!important;
    transform:translate(-50%,-50%)!important;
  }

  body #orders-ajax-root.ho-orders-174 .ho124-detail .ho54-detail-header{
    padding:15px 16px 13px!important;
  }
  body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-detail-scroll{
    padding:14px 16px 16px!important;
  }

  body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-footer-buttons{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    grid-template-areas:
      "primary primary"
      "cancel print"!important;
    gap:8px!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-primary-form{
    grid-area:primary!important;
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-cancel-form{
    grid-area:cancel!important;
    grid-column:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-print-button{
    grid-area:print!important;
    grid-column:2!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  body #orders-ajax-root.ho-orders-174 .ho124-detail .ho68-primary-form > button{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
}
