/* Thành Phát EV v0.0.73 — The modal photo AND video viewport is always 16:9.
 * Eliminate tall mobile photo stage and its empty horizontal bands.
 * Desktop, tablet and phone share the same media aspect ratio.
 */
.tpa-evv-vehicle .tpa-evx-gallery-stage-row{
  flex-shrink:0;
}
.tpa-evv-vehicle .tpa-evx-gallery-stage{
  position:relative;
  display:block;
  width:100%;
  height:auto;
  min-height:0;
  max-height:none;
  aspect-ratio:16 / 9;
  background:#0b2537;
  border-radius:12px;
  overflow:hidden;
}
.tpa-evv-vehicle .tpa-evx-gallery-stage > img,
.tpa-evv-vehicle .tpa-evx-gallery-stage > video,
.tpa-evv-vehicle .tpa-evx-gallery-stage > iframe{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  border:0;
}
/* Photos fill the exact 16:9 frame, including legacy source images in 4:3. */
.tpa-evv-vehicle .tpa-evx-gallery-stage > img{object-fit:cover;object-position:center}
/* Keep full native video controls/frame visible if the source itself isn't 16:9. */
.tpa-evv-vehicle .tpa-evx-gallery-stage > video{object-fit:contain}
/* The embedded player fills the viewport and keeps its native 16:9 proportions. */
.tpa-evv-vehicle .tpa-evx-gallery-stage > iframe{aspect-ratio:16 / 9}
/* A compact modal follows the actual media size instead of stretching to 100vh.
 * The modal scrolls on short devices rather than distorting the media ratio. */
.tpa-evv-vehicle .tpa-evx-gallery-modal{
  overflow-y:auto;
  overscroll-behavior-y:contain;
}
@media(max-width:600px){
  .tpa-evv-vehicle .tpa-evx-gallery-dialog{
    height:fit-content;
    max-height:calc(100dvh - 16px);
    width:min(100vw - 16px, 490px);
    border-radius:16px;
    margin:auto;
  }
  .tpa-evv-vehicle .tpa-evx-gallery-modal{
    height:auto;
    max-height:calc(100dvh - 16px);
    padding:12px 10px calc(12px + env(safe-area-inset-bottom));
  }
  .tpa-evv-vehicle .tpa-evx-gallery-stage{
    height:auto;
    aspect-ratio:16 / 9;
    border-radius:10px;
  }
}
