/**handles:klds-modal**/

/* =========================================================
   KL Order Detail Modal (Suite)
   ========================================================= */

#order-popup{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;

  display: none; /* toggled by JS */
  justify-content: center;
  align-items: center;
  padding: 20px;

  overflow: hidden; /* no scrolling on overlay */
}

#order-popup-container{
  background: #fff;
  border-radius: 20px;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;

  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);

  padding: 32px;
  box-sizing: border-box;

  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#kitalabel-modal-close{
  position: absolute;
  top: 20px;
  right: 20px;

  width: 40px;
  height: 40px;
  background: #F3F4F6;
  border: none;
  border-radius: 50%;

  font-size: 26px;
  line-height: 1;
  color: #6B7280;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s ease;
  z-index: 50;
  padding: 0;
}
#kitalabel-modal-close:hover{
  background: #E5E7EB;
  color: #111827;
  transform: rotate(90deg);
}

/* the only scroller */
#order-popup-scroll{
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  max-height: 100%;
  padding-right: 10px;
  margin-right: -10px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.2) transparent;
  scroll-behavior: smooth;
}
#order-popup-scroll::-webkit-scrollbar { width: 6px; }
#order-popup-scroll::-webkit-scrollbar-track { background: transparent; }
#order-popup-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
}
#order-popup-scroll::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.35); }

#order-popup.kl-open{ animation: klds-modal-fade .2s ease-out; }
#order-popup.kl-open #order-popup-container{ animation: klds-modal-slide .3s ease-out; }

@keyframes klds-modal-fade { from {opacity:0} to {opacity:1} }
@keyframes klds-modal-slide {
  from { opacity:0; transform: translateY(20px) scale(0.95); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

.klds-modal-loading{
  text-align:center;
  padding:40px;
  color:#6B7280;
  font-weight: 700;
}

/* Mobile fullscreen */
@media (max-width: 640px){
  #order-popup{
    padding: 0 !important;
    align-items: flex-start !important;
  }
  #order-popup-container{
    max-width: 100% !important;
    width: 100% !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    padding: 20px !important;
  }
  #kitalabel-modal-close{
    top: 16px !important;
    right: 16px !important;
  }
  #order-popup-scroll{ max-height: 100%; }
}