
#ts-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  z-index: 900000; /* BELOW modal */
  display: none;
}

#ts-modal{
  position: fixed;
  inset: 0;
  z-index: 900010; /* ABOVE overlay */
  display: none;
  pointer-events: none; /* allow inner to control clicks */
}

#ts-overlay.active,
#ts-modal.active{
  display: block;
}

.ts-modal-inner{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96%;
  max-width: 1280px;
  height: 92vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  z-index: 900020; /* ABOVE everything */
  pointer-events: auto;
}

.ts-modal-inner iframe{
  width: 100%;
  height: calc(100% - 90px);
  border: 0;
}

.ts-close-x{
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 900030; /* TOP */
  font-size: 34px;
  color: #fff;
  background: rgba(0,0,0,.45);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ts-modal-footer{
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  border-top: 1px solid #eee;
}

body.ts-modal-open{
  overflow: hidden;
}
