/* =========================
   TTS 플레이어(view_utwrap + tts-player)
   - view_utmenu 왼쪽에 붙는 캡슐 UI
   ========================= */

/* 1) TTS 래퍼: 오른쪽 정렬 라인에 같이 올라오게 */
.view_utwrap{
  display: inline-block;
  vertical-align: middle;
  margin-right: 10px;          /* view_utmenu와 간격 */
  margin-top: 24px;
  float: right;
}

/* 모바일에서 줄바꿈 자연스럽게 */
@media (max-width: 480px){
  .view_utwrap{ margin-right: 8px; }
}

/* 2) 플레이어 캡슐 */
.tts-player{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.94);

  box-shadow: 0 5px 6px rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);

  user-select: none;
}

/* 3) 버튼 */
.tts-btn{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 0;

  background: #111;
  color: #fff;

  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition: transform .12s ease, opacity .12s ease;
}

.tts-btn:hover{ opacity: .92; }
.tts-btn:active{ transform: scale(0.96); }

.tts-ic{
  font-size: 14px;
  line-height: 1;
}

/* 4) 텍스트(타이틀/시간) */
.tts-meta{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 118px;            /* 시간 자리 확보(숫자 흔들림 방지) */
}

.tts-title{
  font-size: 12px;
  color: rgba(0,0,0,0.55);
  letter-spacing: -0.2px;
}

.tts-time{
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,0.85);
  font-variant-numeric: tabular-nums;
}

/* 5) 재생 중 상태(선택: JS에서 .is-playing 토글) */
.tts-player.is-playing .tts-btn{
  background: #0b57d0;
}

/* 6) view_utmenu가 기존 float/layout을 유지하면서 옆에 붙도록 보정 */
.view_utmenu{
  display: inline-block;       /* 옆에 붙게 */
  vertical-align: middle;
}


#ttsFloating {
  position: fixed;
  
  top: 70px;              /* 헤더(61px) 아래 살짝 띄운 위치 */
  left: 50%;              /* 화면 가로 가운데 기준 */
  transform: translateX(-50%);
  
  z-index: 99999;
  display: none;         /* 기본 숨김 */
}

/* 보일 때 */
#ttsFloating.is-show {
  display: block;
}

/* 떠다닐 때는 플레이어가 조금 더 컴팩트하게(선택) */
#ttsFloating .tts-player{
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}

/* 모바일에서 가로폭 너무 크면 살짝 줄이기 */
@media (max-width: 480px){
  #ttsFloating { right: 12px; left: 12px; bottom: 12px; }
  #ttsFloating .tts-player{ width: 100%; justify-content: flex-start; }
}

/* 7) 좁은 화면에서 플레이어가 너무 커 보이면 살짝 줄이기 */
@media (max-width: 360px){
  .tts-player{ padding: 7px 10px; gap: 8px; }
  .tts-btn{ width: 32px; height: 32px; }
  .tts-meta{ min-width: 106px; }
}
