/* =========================================================
   AS SALIK V3.10 — GALLERY PREVIEW + MOBILE WHATSAPP + BADGE
   ========================================================= */

/* Gallery preview: FileReader data URL, visible loading state and valid crop. */
.package-gallery-dropzone-v35.is-dragover{
  border-color:#8b1023!important;
  background:#fff1e6!important;
  box-shadow:0 0 0 5px rgba(139,16,35,.09)!important;
}
.package-gallery-preview-item-v35{
  min-width:0;
  background:#fff!important;
  box-shadow:0 9px 24px rgba(72,8,18,.07);
}
.package-gallery-preview-image-v310{
  position:relative;
  width:100%;
  aspect-ratio:4/3;
  overflow:hidden;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#f7ecee,#fff8ee);
}
.package-gallery-preview-image-v310 img{
  position:absolute;
  inset:0;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center top!important;
  opacity:0;
  transition:opacity .2s ease;
}
.package-gallery-preview-item-v35.is-ready .package-gallery-preview-image-v310 img{opacity:1}
.package-gallery-preview-fallback-v310{
  display:grid!important;
  place-items:center;
  padding:0!important;
  color:#8b1023;
  font-size:1.45rem!important;
}
.package-gallery-preview-item-v35.is-ready .package-gallery-preview-fallback-v310{opacity:0}
.package-gallery-preview-item-v35.is-invalid{border-color:#d74a58!important}
.package-gallery-preview-item-v35.is-invalid .package-gallery-preview-fallback-v310{color:#b11f30}

/* Customer payment badge contrast. */
.panel-v310 .payment-action-head-v33 .pdo-eyebrow{
  color:#721020!important;
  background:#fff0c8!important;
  border:1px solid #e6c66f!important;
  opacity:1!important;
  text-shadow:none!important;
}

/* Mobile WhatsApp modal: viewport-safe and centered. */
.whatsapp-mobile-backdrop-v310{
  display:none;
  position:fixed;
  inset:0;
  border:0;
  padding:0;
  background:rgba(30,4,9,.64);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  cursor:pointer;
}
@media(max-width:680px){
  body.whatsapp-popup-open{overflow:hidden!important}
  html body[data-layout="public"] .whatsapp-float{
    left:0!important;
    right:0!important;
    bottom:10px!important;
    transform:none!important;
    width:100%!important;
    display:flex!important;
    justify-content:center!important;
    pointer-events:none;
  }
  html body[data-layout="public"] .whatsapp-float .floating-action-stack{
    position:relative;
    z-index:3;
    flex-direction:row!important;
    justify-content:center!important;
    align-items:center!important;
    pointer-events:auto;
  }
  html body[data-layout="public"] .whatsapp-float.open .floating-action-stack{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
  }
  html body[data-layout="public"] .whatsapp-float.open .whatsapp-mobile-backdrop-v310{
    display:block;
    z-index:1;
    pointer-events:auto;
  }
  html body[data-layout="public"] .whatsapp-card{
    position:fixed!important;
    z-index:2!important;
    left:12px!important;
    right:12px!important;
    top:auto!important;
    bottom:18px!important;
    width:auto!important;
    max-width:none!important;
    max-height:calc(100dvh - 36px)!important;
    margin:0!important;
    transform:translateY(18px) scale(.98)!important;
    overflow:auto!important;
    overscroll-behavior:contain;
    border-radius:23px!important;
    box-sizing:border-box!important;
    pointer-events:none!important;
  }
  html body[data-layout="public"] .whatsapp-float.open .whatsapp-card{
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    pointer-events:auto!important;
  }
  html body[data-layout="public"] .whatsapp-card-head{
    position:sticky;
    top:0;
    z-index:2;
    display:grid!important;
    grid-template-columns:64px minmax(0,1fr) 38px!important;
    gap:12px!important;
    align-items:center!important;
    padding:17px!important;
  }
  html body[data-layout="public"] .operator-avatar-wrap{width:64px!important;height:64px!important}
  html body[data-layout="public"] .whatsapp-card-head>div:nth-child(2){min-width:0}
  html body[data-layout="public"] .whatsapp-card-head strong{
    display:block;
    font-size:1rem!important;
    line-height:1.25!important;
    overflow-wrap:anywhere;
  }
  html body[data-layout="public"] .whatsapp-card-body{padding:20px 17px 18px!important}
  html body[data-layout="public"] .whatsapp-greeting{font-size:1.22rem!important}
  html body[data-layout="public"] .whatsapp-card-body p{font-size:.96rem!important;line-height:1.55!important}
  html body[data-layout="public"] .whatsapp-quick{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
  }
  html body[data-layout="public"] .whatsapp-quick span{
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }
  html body[data-layout="public"] .whatsapp-card .btn-whatsapp{
    width:100%!important;
    min-width:0!important;
    justify-content:center!important;
    white-space:normal!important;
  }
}

@media(max-width:420px){
  html body[data-layout="public"] .whatsapp-card{left:8px!important;right:8px!important;bottom:8px!important;max-height:calc(100dvh - 16px)!important}
  html body[data-layout="public"] .whatsapp-card-head{grid-template-columns:54px minmax(0,1fr) 36px!important;padding:14px!important}
  html body[data-layout="public"] .operator-avatar-wrap{width:54px!important;height:54px!important}
  html body[data-layout="public"] .whatsapp-card-body{padding:17px 14px 15px!important}
}

/* =========================================================
   V3.10.1 — Berita & Aktiviti Admin Editor
   ========================================================= */
.news-admin-layout-v310{
  display:grid;
  grid-template-columns:minmax(360px,.48fr) minmax(0,1.52fr);
  gap:18px;
  align-items:start;
}
.news-editor-v310{
  position:sticky;
  top:92px;
  margin:0!important;
  min-width:0;
}
.news-list-v310{
  margin:0!important;
  min-width:0;
}
.news-edit-preview-v310{
  display:grid;
  grid-template-columns:112px minmax(0,1fr);
  gap:14px;
  align-items:center;
  margin-bottom:16px;
  padding:12px;
  border:1px solid #efdfcf;
  border-radius:16px;
  background:#fff8ef;
}
.news-edit-preview-v310 img{
  width:112px;
  height:82px;
  object-fit:cover;
  object-position:center top;
  border-radius:12px;
  background:#eee;
}
.news-edit-preview-v310 strong,
.news-edit-preview-v310 span{
  display:block;
}
.news-edit-preview-v310 span{
  margin-top:4px;
  color:#826f72;
  font-size:.72rem;
  line-height:1.5;
}
.news-basic-editor-v310{
  min-height:230px;
  max-height:460px;
  overflow:auto;
  padding:16px;
  border:1px solid #dbc9cc;
  border-radius:0 0 14px 14px;
  background:#fff;
  line-height:1.7;
}
.news-basic-editor-v310:focus{
  outline:2px solid rgba(128,18,34,.13);
  border-color:#801222;
}
.news-table-item-v310{
  display:grid;
  grid-template-columns:96px minmax(190px,1fr);
  gap:13px;
  align-items:center;
  min-width:310px;
}
.news-table-item-v310 img{
  width:96px;
  height:72px;
  object-fit:cover;
  object-position:center top;
  border-radius:13px;
  background:#eee;
}
.news-table-item-v310 strong,
.news-table-item-v310 small{
  display:block;
}
.news-table-item-v310 strong{
  color:#4c0711;
  font-size:.84rem;
  line-height:1.35;
}
.news-table-item-v310 small{
  display:-webkit-box;
  margin-top:5px;
  max-width:430px;
  overflow:hidden;
  color:#806e71;
  font-size:.7rem;
  line-height:1.45;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.news-row-actions-v310{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  align-items:center;
  min-width:250px;
}
.news-status-form-v310{
  display:flex;
  gap:6px;
  align-items:center;
}
.news-status-form-v310 .pdo-select{
  width:112px;
  min-width:112px;
  height:38px;
  padding:6px 28px 6px 10px;
  font-size:.7rem;
}
.news-status-form-v310 .btn{
  width:38px;
  min-width:38px;
  height:38px;
  padding:0;
}
@media(max-width:1200px){
  .news-admin-layout-v310{grid-template-columns:1fr}
  .news-editor-v310{position:static}
}
@media(max-width:680px){
  .news-edit-preview-v310{grid-template-columns:78px minmax(0,1fr)}
  .news-edit-preview-v310 img{width:78px;height:66px}
  .news-table-item-v310{grid-template-columns:64px minmax(170px,1fr);min-width:245px}
  .news-table-item-v310 img{width:64px;height:58px}
  .news-row-actions-v310{min-width:210px}
}
