
/* Generic cached shortcode styles */
.milera-erp-list{margin:0;padding-left:1.25em}
.milera-erp-list li{margin:.3em 0}
.milera-erp-details-item{margin-bottom:1.25em}
.milera-erp-details-item:last-child{margin-bottom:0}
.milera-erp-details-title{font-weight:700;margin-bottom:.3em}
.milera-erp-gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.milera-erp-gallery img{display:block;width:100%;height:auto}
.milera-erp-empty{display:none}

/* Rooms: kept compatible with the original Milera Package ERP Details layout */
.milera-package-erp-details{width:100%}
.mped-section{margin:28px 0}
.mped-section>h3{margin:0 0 18px!important;font-size:24px!important;line-height:1.2!important}
.mped-richtext{line-height:1.7}
.mped-richtext p:first-child{margin-top:0}
.mped-richtext p:last-child{margin-bottom:0}

.mped-room-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.mped-room-card{border:1px solid #e8e8e8;border-radius:14px;background:#fff;overflow:hidden}
.mped-room-card-image{aspect-ratio:4/3;background:#f3f3f3;position:relative}
.mped-room-card-image:after{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 1px rgba(0,0,0,.04)}
.mped-room-card-image img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s ease}
.mped-room-card:hover .mped-room-card-image img{transform:scale(1.025)}
.mped-room-card:not(:has(.mped-room-card-image)) .mped-room-card-body{padding-top:18px}
.mped-room-card-body{padding:16px}
.mped-room-card-body h4{margin:0 0 6px!important;font-size:19px!important}
.mped-room-area{margin-bottom:8px;font-size:13px;opacity:.7}
.mped-room-card-desc{line-height:1.55;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.mped-room-tags{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}
.mped-room-tags span{padding:6px 9px;border-radius:999px;background:#f2f4f2;font-size:12px}
.mped-room-more{margin-top:12px;border:0;border-radius:8px;background:#2f7d4a;color:#fff;padding:9px 13px;font-weight:700;cursor:pointer}

.mped-room-hidden[hidden],.mped-room-card-extra[hidden]{display:none!important}
.mped-room-toggle-wrap{display:flex;justify-content:center;width:100%;margin-top:24px}
.mped-room-toggle{appearance:none;border:1px solid currentColor;border-radius:8px;background:transparent;padding:11px 20px;font:inherit;font-weight:600;cursor:pointer}

.mped-room-modal[hidden]{display:none!important}
.mped-room-modal{position:fixed;inset:0;z-index:999999;display:grid;place-items:center;padding:20px}
.mped-room-modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.65)}
.mped-room-modal-card{position:relative;z-index:1;width:min(900px,100%);max-height:90vh;overflow:auto;padding:24px;border-radius:16px;background:#fff}
.mped-room-modal-close{float:right;width:38px;height:38px;border:0;border-radius:50%;font-size:24px;line-height:1;cursor:pointer}
.mped-modal-open{overflow:hidden}

.mped-room-detail-main{aspect-ratio:16/9;overflow:hidden;border-radius:12px;background:#f3f3f3}
.mped-room-detail-main img{display:block;width:100%;height:100%;object-fit:cover}
.mped-room-detail-thumbs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;width:100%!important;margin-top:12px!important}
.mped-room-detail-thumbs button{display:block!important;width:100%!important;min-width:0!important;padding:0!important;margin:0!important;border:0!important;background:transparent!important;border-radius:10px!important;overflow:hidden!important;cursor:pointer!important;aspect-ratio:4/3!important}
.mped-room-detail-thumbs button img,.mped-room-detail-thumbs img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:10px!important}
.mped-room-detail-thumb{opacity:.75}
.mped-room-detail-thumb.is-active{opacity:1;outline:2px solid #2f7d4a;outline-offset:2px}

.mped-occupancies{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}
.mped-occupancies>div{padding:10px;border-radius:8px;background:#f7f7f7}
.mped-occupancies strong,.mped-occupancies span{display:block}
.mped-occupancies span{font-size:13px;margin-top:2px}

@media(max-width:900px){
  .mped-room-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:700px){
  .mped-room-detail-thumbs{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .mped-occupancies{grid-template-columns:1fr}
}
@media(max-width:600px){
  .mped-room-grid{grid-template-columns:1fr}
  .mped-room-modal{padding:8px}
  .mped-room-modal-card{padding:16px}
}


/* v1.3.0 - [milera_erp_gallery] keeps the original ERP gallery layout */
.mped-gallery-section{margin:28px 0}
.mped-gallery-section>h3{margin:0 0 16px!important}

.mped-gallery-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}

.mped-gallery-grid-item{
  overflow:hidden;
  border-radius:12px;
  background:#f3f3f3;
  aspect-ratio:4/3;
}

.mped-gallery-grid-item img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .25s ease;
}

.mped-gallery-grid-item:hover img{
  transform:scale(1.025);
}

@media(max-width:600px){
  .mped-gallery-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }
}


/* v1.4.0 - Hotel gallery carousel + lightbox */
.mped-gallery-carousel-wrap{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
}
.mped-gallery-carousel{
  display:flex;
  gap:12px;
  overflow-x:auto;
  scroll-behavior:smooth;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
  width:100%;
}
.mped-gallery-carousel::-webkit-scrollbar{display:none}
.mped-gallery-slide{
  flex:0 0 calc((100% - 24px)/3);
  scroll-snap-align:start;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:12px!important;
  overflow:hidden!important;
  background:#f3f3f3!important;
  aspect-ratio:4/3;
  cursor:pointer;
}
.mped-gallery-slide img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transition:transform .25s ease;
}
.mped-gallery-slide:hover img{transform:scale(1.03)}
.mped-gallery-nav{
  flex:0 0 42px;
  width:42px;
  height:42px;
  border:0!important;
  border-radius:50%!important;
  background:#fff!important;
  box-shadow:0 2px 12px rgba(0,0,0,.15);
  cursor:pointer;
  font-size:28px;
  line-height:1;
  display:grid;
  place-items:center;
  padding:0!important;
  z-index:2;
}
.mped-gallery-nav:disabled{opacity:.35;cursor:default}

.mped-gallery-lightbox[hidden]{display:none!important}
.mped-gallery-lightbox{
  position:fixed;
  inset:0;
  z-index:999999;
  display:grid;
  place-items:center;
  padding:20px;
}
.mped-gallery-lightbox-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.88);
}
.mped-gallery-lightbox-inner{
  position:relative;
  z-index:1;
  width:min(1200px,96vw);
  height:min(88vh,900px);
  display:grid;
  grid-template-columns:56px 1fr 56px;
  grid-template-rows:1fr auto;
  align-items:center;
  gap:10px;
}
.mped-gallery-lightbox-stage{
  grid-column:2;
  grid-row:1;
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  overflow:hidden;
}
.mped-gallery-lightbox-stage img{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
}
.mped-gallery-lightbox-prev,
.mped-gallery-lightbox-next,
.mped-gallery-lightbox-close{
  border:0!important;
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
  cursor:pointer;
}
.mped-gallery-lightbox-prev,
.mped-gallery-lightbox-next{
  width:50px;
  height:50px;
  border-radius:50%!important;
  font-size:36px;
  line-height:1;
  display:grid;
  place-items:center;
  padding:0!important;
}
.mped-gallery-lightbox-prev{grid-column:1;grid-row:1}
.mped-gallery-lightbox-next{grid-column:3;grid-row:1}
.mped-gallery-lightbox-close{
  position:absolute;
  top:-8px;
  right:-8px;
  width:44px;
  height:44px;
  border-radius:50%!important;
  font-size:28px;
  line-height:1;
  padding:0!important;
}
.mped-gallery-lightbox-counter{
  grid-column:1/4;
  grid-row:2;
  text-align:center;
  color:#fff;
  font-size:14px;
}
body.mped-gallery-open{overflow:hidden}

@media(max-width:800px){
  .mped-gallery-slide{flex-basis:calc((100% - 12px)/2)}
  .mped-gallery-nav{width:38px;height:38px;flex-basis:38px}
}
@media(max-width:520px){
  .mped-gallery-slide{flex-basis:84%}
  .mped-gallery-carousel-wrap{gap:6px}
  .mped-gallery-nav{width:34px;height:34px;flex-basis:34px;font-size:24px}
  .mped-gallery-lightbox{padding:8px}
  .mped-gallery-lightbox-inner{
    width:100%;
    height:92vh;
    grid-template-columns:42px 1fr 42px;
  }
  .mped-gallery-lightbox-prev,
  .mped-gallery-lightbox-next{
    width:38px;height:38px;font-size:28px;
  }
}


/* v1.5.0 - full width gallery, overlay arrows, swipe friendly */
.milera-erp-cached-gallery{
  width:100%;
  max-width:none!important;
}

.mped-gallery-carousel-wrap{
  position:relative;
  display:block!important;
  width:100%;
  max-width:none!important;
  overflow:hidden;
}

.mped-gallery-carousel{
  display:flex;
  width:100%;
  max-width:none!important;
  gap:12px;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
  touch-action:pan-x pinch-zoom;
  scroll-behavior:smooth;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
}

.mped-gallery-carousel::-webkit-scrollbar{display:none}

.mped-gallery-slide{
  flex:0 0 calc((100% - 24px)/3);
  max-width:none!important;
  scroll-snap-align:start;
}

.mped-gallery-nav{
  position:absolute!important;
  top:50%;
  transform:translateY(-50%);
  z-index:20;
  width:46px!important;
  height:46px!important;
  flex:0 0 46px!important;
  border-radius:50%!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 3px 14px rgba(0,0,0,.22)!important;
}

.mped-gallery-prev{left:14px!important}
.mped-gallery-next{right:14px!important}

@media(max-width:800px){
  .mped-gallery-slide{flex-basis:calc((100% - 12px)/2)}
  .mped-gallery-nav{
    width:42px!important;
    height:42px!important;
    flex-basis:42px!important;
  }
}

@media(max-width:520px){
  .mped-gallery-carousel{gap:8px}
  .mped-gallery-slide{flex-basis:88%}
  .mped-gallery-nav{
    width:38px!important;
    height:38px!important;
    flex-basis:38px!important;
    font-size:26px!important;
  }
  .mped-gallery-prev{left:8px!important}
  .mped-gallery-next{right:8px!important}
}


/* v1.6.0 - 4 desktop / 2 mobile + equal height from shortest proportional image */
.mped-gallery-carousel{
  gap:12px!important;
  align-items:flex-start;
}

.mped-gallery-slide{
  flex:0 0 calc((100% - 36px)/4)!important;
  aspect-ratio:auto!important;
  height:auto;
}

.mped-gallery-slide img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}

@media(max-width:700px){
  .mped-gallery-carousel{
    gap:8px!important;
  }

  .mped-gallery-slide{
    flex:0 0 calc((100% - 8px)/2)!important;
  }
}
