/* ======================================================================
   TMT Dual Player
   - Visually aligned with TMT Single Player
   - Own CSS (no dependency on #tmt-single-player)
   ====================================================================== */

#tmt-dual-player{
  overflow-x:hidden;
  --tmt-cover-w:340px;   /* same desktop cover width */
  --tmt-row-fs:16px;     /* base font size variable if needed */
  --waveColor:34,34,34;
  --progress:0%;
}

/* Card baseline – copy of single-player card styling */
#tmt-dual-player .card{
  background:var(--tmt-panel-grad) !important;
  border:1px solid rgba(0,0,0,.06) !important;
  box-shadow:0 4px 10px rgba(0,0,0,.08) !important;
  border-radius:12px !important;
  transition:var(--hover-transition) !important;
  padding:2rem !important;
  position:relative; /* anchor for tooltip in bottom-right */
}
@media (hover:hover){
  #tmt-dual-player .card:hover{
    transform:translateY(-5px) !important;
    box-shadow:0 10px 24px rgba(0,0,0,.14) !important;
  }
}

/* Unclip ancestors */
#tmt-dual-player,
#tmt-dual-player .container,
#tmt-dual-player .card{
  overflow:visible !important;
}

/* ===========================================================
   Layout: same cover + playlist structure as single player
   =========================================================== */

#tmt-dual-player .tmt-two-col{
  display:grid;
  grid-template-columns:var(--tmt-cover-w) 1fr;
  gap:1.25rem;
}
@media (max-width:900px){
  #tmt-dual-player .tmt-two-col{
    grid-template-columns:1fr;
    gap:.55rem;
  }
}

/* Cover + caption */
#tmt-dual-player .tmt-cover{
  position:relative;
  max-width:var(--tmt-cover-w);
}
#tmt-dual-player .tmt-cover img{
  width:100%;
  max-width:var(--tmt-cover-w);
  aspect-ratio:1/1;
  object-fit:cover;
  border-radius:12px;
  display:block;
  margin:0;
}
@media (max-width:900px){
  #tmt-dual-player .tmt-cover{
    margin:0 auto;
  }
}
#tmt-dual-player .tmt-cover-caption{
  margin-top:.5rem;
  font-size:1rem;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:clip;
  padding:0 .25rem;
}

/* ===========================================================
   Playlist – #dualPlaylist mirrors #tmtPlaylist look
   =========================================================== */

#tmt-dual-player .tmt-playlist-wrap{
  max-height:var(--tmt-cover-w);
  overflow:auto;
  scrollbar-width:thin;
  scrollbar-color:#000 transparent;
}
#tmt-dual-player .tmt-playlist-wrap::-webkit-scrollbar{
  width:10px;
}
#tmt-dual-player .tmt-playlist-wrap::-webkit-scrollbar-track{
  background:transparent;
}
#tmt-dual-player .tmt-playlist-wrap::-webkit-scrollbar-thumb{
  background:#000;
  border-radius:6px;
}

/* Items */
#tmt-dual-player #dualPlaylist{
  margin:0;
  padding:0;
  list-style:none;
}
#tmt-dual-player #dualPlaylist .tmt-item{
  position:relative;
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  padding:.6rem .5rem .6rem .9rem;
  border-radius:8px;
  cursor:pointer;
}
#tmt-dual-player #dualPlaylist .tmt-title,
#tmt-dual-player #dualPlaylist .tmt-duration{
  font-size:20px;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:clip;
}
#tmt-dual-player #dualPlaylist .tmt-duration{
  font-variant-numeric:tabular-nums;
  opacity:.9;
  padding-left:.75rem;
}
#tmt-dual-player #dualPlaylist .tmt-item.is-active,
#tmt-dual-player #dualPlaylist .tmt-item[aria-selected="true"]{
  background:linear-gradient(90deg, rgba(0,0,0,.06), rgba(0,0,0,.03));
}
#tmt-dual-player #dualPlaylist .tmt-item.is-active::before,
#tmt-dual-player #dualPlaylist .tmt-item[aria-selected="true"]::before{
  content:"";
  position:absolute;
  left:0;
  top:6px;
  bottom:6px;
  width:6px;
  background:#000;
  border-radius:0 6px 6px 0;
}

/* ===========================================================
   Waveform & transport – aligned with single player
   =========================================================== */

#tmt-dual-player .tmt-wave-wrap{
  margin-top:1rem;
  position:relative;
}
#tmt-dual-player #dualWave{
  display:block;
  width:100%;
  height:96px;
  border-radius:8px;
  background:transparent;
  cursor:pointer;
}

/* Transport row */
#tmt-dual-player .tmt-transport{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  margin-top:.6rem;
}
#tmt-dual-player .tmt-transport button{
  appearance:none;
  border:none;
  background:transparent;
  padding:.25rem;
  line-height:0;
  cursor:pointer;
  color:inherit;
  border-radius:999px;
  min-width:40px;
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:background-color .15s ease, transform .1s ease, opacity .15s ease;
}
#tmt-dual-player .tmt-transport .icon{
  width:28px;
  height:28px;
  display:block;
}
#tmt-dual-player .tmt-transport .play .icon{
  width:36px;
  height:36px;
}
#tmt-dual-player .tmt-transport .icon,
#tmt-dual-player .tmt-transport .icon *{
  pointer-events:none;
}

/* Time display */
#tmt-dual-player .tmt-time{
  text-align:center;
  margin-top:.25rem;
  font-variant-numeric:tabular-nums;
  opacity:.9;
}

/* ===========================================================
   Transport button refinements (no circles)
   =========================================================== */

/* Remove circular hover overlay from prev / play / next */
#tmt-dual-player .tmt-transport #prev,
#tmt-dual-player .tmt-transport #playPause,
#tmt-dual-player .tmt-transport #next{
  background:none !important;
  border-radius:0 !important;
}

/* Kill the circle + lift effect on hover/active */
#tmt-dual-player .tmt-transport #prev:hover,
#tmt-dual-player .tmt-transport #playPause:hover,
#tmt-dual-player .tmt-transport #next:hover,
#tmt-dual-player .tmt-transport #prev:active,
#tmt-dual-player .tmt-transport #playPause:active,
#tmt-dual-player .tmt-transport #next:active{
  background:none !important;
  transform:none !important;
}

/* Icon sizes for previous / play / next */
#tmt-dual-player #prev .icon,
#tmt-dual-player #playPause .icon,
#tmt-dual-player #next .icon{
  width:28px;
  height:28px;
}
#tmt-dual-player #playPause .icon{
  width:34px;
  height:34px;
}

/* Shuffle & Loop – flat icons, muted by default, no circles */
#tmt-dual-player #shuffleBtn,
#tmt-dual-player #loopBtn{
  background:none !important;
  border-radius:0 !important;
  padding:.25rem;
  min-width:40px;
  min-height:40px;
}

#tmt-dual-player #shuffleBtn .icon,
#tmt-dual-player #loopBtn .icon{
  width:22px;
  height:22px;
  color:var(--muted, #6b7280) !important;
  transition:color .15s ease;
}

/* No hover pill for these two */
#tmt-dual-player #shuffleBtn:hover,
#tmt-dual-player #loopBtn:hover,
#tmt-dual-player #shuffleBtn:active,
#tmt-dual-player #loopBtn:active{
  background:none !important;
  transform:none !important;
}

/* Active state (aria-pressed="true"): icon turns solid text color */
#tmt-dual-player #shuffleBtn[aria-pressed="true"] .icon,
#tmt-dual-player #loopBtn[aria-pressed="true"] .icon{
  color:var(--text, #000) !important;
}

/* ===========================================================
   Mobile: progress bar instead of waveform
   =========================================================== */

#tmt-dual-player .playbar{
  display:none;
  margin-top:.6rem;
}
#tmt-dual-player .playbar input[type="range"]{
  width:100%;
  -webkit-appearance:none;
  appearance:none;
  height:8px;
  border-radius:999px;
  background:linear-gradient(
    90deg,
    rgba(var(--waveColor),1) 0 var(--progress),
    rgba(var(--waveColor),.25) var(--progress) 100%
  );
}
#tmt-dual-player .playbar input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#000;
  border:2px solid #fff;
  box-shadow:0 1px 2px rgba(0,0,0,.25);
  margin-top:-3px;
}
#tmt-dual-player .playbar input[type="range"]::-moz-range-track{
  height:8px;
  border-radius:999px;
  background:rgba(var(--waveColor),.25);
}
#tmt-dual-player .playbar input[type="range"]::-moz-range-progress{
  height:8px;
  border-radius:999px;
  background:rgba(var(--waveColor),1);
}
#tmt-dual-player .playbar input[type="range"]::-moz-range-thumb{
  width:14px;
  height:14px;
  border-radius:50%;
  background:#000;
  border:2px solid #fff;
  box-shadow:0 1px 2px rgba(0,0,0,.25);
}

/* Swap waveform for playbar on narrow portrait screens */
@media (max-width:700px) and (orientation:portrait){
  #tmt-dual-player #dualWave{
    display:none;
  }
  #tmt-dual-player .playbar{
    display:block;
  }
}

/* ===========================================================
   Info button + tooltip (bottom-right, more readable)
   =========================================================== */

#tmt-dual-player .tmt-info{
  position:absolute;
  right:1.25rem;
  bottom:1.25rem;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:.5rem;
}

/* Small “i” button */
#tmt-dual-player .tmt-info-btn{
  width:22px;
  height:22px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.25);
  background:rgba(255,255,255,.9);
  font-size:13px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  padding:0;
  box-shadow:0 2px 4px rgba(0,0,0,.16);
  transition:background-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
#tmt-dual-player .tmt-info-btn:hover{
  background:#000;
  color:#fff;
  box-shadow:0 4px 10px rgba(0,0,0,.25);
}
#tmt-dual-player .tmt-info-btn:active{
  transform:translateY(1px);
}

/* Tooltip box – wider, normal text flow */
#tmt-dual-player .tmt-info-box{
  position:absolute;
  right:36px;
  bottom:36px;
  max-width:min(420px, 90vw);
  min-width:260px;
  padding:.9rem 1rem;
  background:rgba(0,0,0,.9);
  color:#fff;
  border-radius:10px;
  font-size:.85rem;
  line-height:1.5;
  box-shadow:0 10px 25px rgba(0,0,0,.45);
  opacity:0;
  pointer-events:none;
  transform:translateY(4px);
  transition:opacity .15s ease, transform .15s ease;
  z-index:20;
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
}

/* Ensure nothing inside forces weird white-space */
#tmt-dual-player .tmt-info-box *{
  white-space:normal;
  word-break:normal;
  overflow-wrap:break-word;
}

/* Show on hover or when .is-visible class added (focus) */
#tmt-dual-player .tmt-info:hover .tmt-info-box,
#tmt-dual-player .tmt-info-box.is-visible{
  opacity:1;
  pointer-events:auto;
  transform:translateY(0);
}

/* Headings & text */

#tmt-dual-player .tmt-info-title{
  margin:0 0 .45rem;
  font-size:.95rem;
  font-weight:700;          /* a bit stronger */
  color:#fff;               /* pure white */
  letter-spacing:.01em;
}

#tmt-dual-player .tmt-info-body{
  margin:0 0 .55rem;
}
#tmt-dual-player .tmt-info-subtitle{
  margin:.5rem 0 .3rem;
  font-size:.88rem;
  font-weight:650;          /* slightly lighter than title but still bold */
  color:#f5f5f5;            /* near white for subtle hierarchy */
  letter-spacing:.01em;
}
/* Shortcut list: one clear line per shortcut */
#tmt-dual-player .tmt-info-list{
  list-style:none;
  margin:0;
  padding:0;
}
#tmt-dual-player .tmt-info-list li{
  margin:.15rem 0;
  line-height:1.45;
}

/* Key part (before colon) */
#tmt-dual-player .tmt-info-list .keys{
  font-family:system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-variant-numeric:tabular-nums;
  font-weight:600;
  opacity:.95;
}

/* The colon between key and description */
#tmt-dual-player .tmt-info-list .sep{
  margin:0 .25rem 0 .15rem;
}

/* Description part */
#tmt-dual-player .tmt-info-list .desc{
  opacity:.9;
}


/* On small screens: show tooltip as a fixed, wide overlay */
@media (max-width:700px){
  /* Move the little “i” button slightly inwards */
  #tmt-dual-player .tmt-info{
    right:1rem;
    bottom:1rem;
  }

  /* Tooltip becomes fixed and almost full-width */
  #tmt-dual-player .tmt-info-box{
    position:fixed;
    left:1rem;
    right:1rem;
    bottom:4.5rem; /* sits above the button and player controls */
    max-width:none;
    min-width:0;
    transform:translateY(0);  /* no slide offset */
  }
}
/* A/B toggle overlay – centered on cover, stateful */
#tmt-dual-player .tmt-ab-toggle{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  z-index:2;
  width:64px;
  height:64px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.12);
  box-shadow:0 3px 10px rgba(0,0,0,0.15);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  transition:all .25s ease;
}

/* Default A state (white, black text) */
#tmt-dual-player .tmt-ab-toggle.is-A{
  background:#fff;
  color:#000;
}
#tmt-dual-player .tmt-ab-toggle.is-A:hover{
  background:#000;
  color:#fff;
  transform:translate(-50%,-50%) scale(1.05);
}

/* B state (black, white text) */
#tmt-dual-player .tmt-ab-toggle.is-B{
  background:#000;
  color:#fff;
}
#tmt-dual-player .tmt-ab-toggle.is-B:hover{
  background:#fff;
  color:#000;
  transform:translate(-50%,-50%) scale(1.05);
}
/* === Dual player: mobile font scaling === */
@media (max-width:700px) and (orientation:portrait){
  #tmt-dual-player {
    --tmt-row-fs: 14px; /* smaller base font size */
  }

  #tmt-dual-player .tmt-cover-caption {
    font-size: .9rem;
  }

  #tmt-dual-player #dualPlaylist .tmt-title,
  #tmt-dual-player #dualPlaylist .tmt-duration {
    font-size: 15px !important;
    line-height: 1.3;
  }

  #tmt-dual-player .tmt-info-box {
    font-size: .8rem;
    line-height: 1.4;
  }
}
