/* TBP Gallery – Enterprise (Image + Video in one slider) */

:root{
  --tbp-accent:#ff3c00;
  --tbp-border:#e8eaed;
  --tbp-bg:#fff;
  --tbp-shadow:0 10px 30px rgba(0,0,0,.08);
}

.tbp-gallery-enterprise{
  display:flex;
  gap:14px;
  width:100%;
}

.tbp-g-main{
  flex: 1 1 auto;
  min-width: 0;
}

.tbp-g-thumbs{
  width: 92px;
  flex: 0 0 92px;
}

@media (max-width: 992px){
  .tbp-gallery-enterprise{
    flex-direction:column;
  }
  .tbp-g-thumbs{
    width:100%;
    flex:0 0 auto;
    order:2;
  }
}

/* Main swiper container */
.tbp-g-main .tbp-swiper{
  background: var(--tbp-bg);
  border:1px solid var(--tbp-border);
  border-radius: 14px;
  box-shadow: var(--tbp-shadow);
  overflow:hidden;
}

/* Slide media area */
.tbp-slide{
  height: 520px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  background:#fff;
}

@media (max-width: 992px){
  .tbp-slide{ height: 380px; }
}

/* Image */
.tbp-imgwrap{
  width:100%;
  height:100%;
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:zoom-in;
}

.tbp-imgwrap img{
  width:100%;
  height:100%;
  object-fit: contain;
  transform-origin: center center;
  transition: transform .18s ease, transform-origin .05s linear;
  will-change: transform;
}

/* Zoom state on desktop */
@media (hover:hover) and (pointer:fine){
  .tbp-imgwrap.is-zoomed img{
    transform: scale(2);
  }
}

/* Video */
.tbp-videowrap{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#000;
}
.tbp-videowrap video{
  width:100%;
  height:100%;
  object-fit: contain;
  background:#000;
}

/* Video badge overlay */
.tbp-media-badge{
  position:absolute;
  top:12px;
  left:12px;
  padding:6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color:#fff;
  font-size:12px;
  display:flex;
  gap:6px;
  align-items:center;
  user-select:none;
}
.tbp-media-badge svg{ width:14px; height:14px; }

/* Swiper nav buttons */
.tbp-g-main .swiper-button-next,
.tbp-g-main .swiper-button-prev{
  color:#111;
  width:44px;
  height:44px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
}
.tbp-g-main .swiper-button-next:after,
.tbp-g-main .swiper-button-prev:after{
  font-size:16px;
  font-weight:700;
}
.tbp-g-main .swiper-pagination-bullet{
  background:#bbb;
  opacity:1;
}
.tbp-g-main .swiper-pagination-bullet-active{
  background: var(--tbp-accent);
}

/* Thumbs */
.tbp-g-thumbs .tbp-thumbs{
  border:1px solid var(--tbp-border);
  border-radius: 14px;
  background:#fff;
  box-shadow: var(--tbp-shadow);
  overflow:hidden;
}

.tbp-thumb-slide{
  height: 76px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:6px;
  position:relative;
}

.tbp-thumb{
  width:100%;
  height:100%;
  object-fit: cover;
  border-radius: 10px;
  border:2px solid transparent;
  background:#f6f7f8;
}
.swiper-slide-thumb-active .tbp-thumb{
  border-color: var(--tbp-accent);
}

.tbp-thumb-play{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}
.tbp-thumb-play span{
  width:30px; height:30px;
  border-radius:999px;
  background: rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
}
.tbp-thumb-play svg{ width:14px; height:14px; fill:#fff; }

/* Fullscreen modal */
.tbp-lightbox{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.88);
  z-index: 99999;
  display:none;
}
.tbp-lightbox.is-open{ display:block; }

.tbp-lightbox-inner{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
}

.tbp-lb-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  color:#fff;
  user-select:none;
}
.tbp-lb-title{
  font-size:14px;
  opacity:.9;
}
.tbp-lb-actions{
  display:flex;
  gap:10px;
}
.tbp-lb-btn{
  border:1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color:#fff;
  border-radius: 12px;
  padding:8px 10px;
  cursor:pointer;
}
.tbp-lb-btn:hover{
  background: rgba(255,255,255,.14);
}

.tbp-lb-main{
  flex: 1 1 auto;
  min-height:0;
  border-radius: 18px;
  overflow:hidden;
  background:#000;
}

.tbp-lb-main .tbp-slide{ height: calc(100vh - 120px); }
@media (max-width: 992px){
  .tbp-lb-main .tbp-slide{ height: calc(100vh - 150px); }
}

body.tbp-noscroll{
  overflow:hidden !important;
}


/* ===== Enterprise Lightbox polish overrides ===== */
.tbp-lightbox-inner{
  padding:0;
  gap:0;
}
.tbp-lb-top{
  position:absolute;
  top:0; left:0; right:0;
  padding:12px 14px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  z-index: 2;
}
.tbp-lb-main{
  position:absolute;
  inset:0;
  border-radius:0;
}
.tbp-lb-main .tbp-slide{
  height: 100vh;
}
.tbp-lb-main .swiper-button-next,
.tbp-lb-main .swiper-button-prev{
  color:#fff;
  background: rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.18);
}
.tbp-lb-main .swiper-pagination-bullet{
  background: rgba(255,255,255,.5);
}
.tbp-lb-main .swiper-pagination-bullet-active{
  background: var(--tbp-accent);
}


/* ===== TBP Gallery Enterprise v3 overrides (fullscreen + mobile thumbs) ===== */

/* Make lightbox truly edge-to-edge */
.tbp-lightbox-inner{ padding:0 !important; }
.tbp-lb-top{
  position:absolute;
  top:0; left:0; right:0;
  z-index: 5;
  padding:10px 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  pointer-events:none;
}
.tbp-lb-top .tbp-lb-actions,
.tbp-lb-top .tbp-lb-title{ pointer-events:auto; }

.tbp-lb-main{
  position:absolute !important;
  inset:0 !important;
  border-radius:0 !important;
}

.tbp-lightbox .tbp-lb-swiper{ height:100vh !important; }
.tbp-lightbox .swiper,
.tbp-lightbox .swiper-wrapper,
.tbp-lightbox .swiper-slide{ height:100% !important; }

.tbp-lightbox .tbp-slide{ height:100% !important; }
.tbp-lightbox .tbp-imgwrap,
.tbp-lightbox .tbp-videowrap{ height:100% !important; }

.tbp-lightbox .tbp-imgwrap{ cursor: default !important; }
.tbp-lightbox .tbp-imgwrap img{ transform:none !important; transform-origin:center center !important; }

/* Mobile thumbs: horizontal, fixed card-like */
@media (max-width: 992px){
  .tbp-g-thumbs .tbp-thumbs{ padding:8px; }
  .tbp-thumb-slide{
    width:76px !important;
    height:76px !important;
  }
}
