/* ============================================================
   style-shareware.css
   プレミアムアンロックモーダル、および無料版制限下のロック表現
   （鍵アイコン・グレーアウト・半透明）用スタイル。
   既存のexport-modal / eq-modal と共通のダーク配色トークンに揃える。
   ============================================================ */

/* AB間ループ回数カウンター(#swLoopCounter)を波形右上に絶対配置するための基準。 */
#vbarContainer {
  position: relative;
}

.sw-unlock-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
}

.sw-unlock-modal-overlay.active {
  display: flex;
}

.sw-unlock-modal {
  width: min(1100px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #16161a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.sw-unlock-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-display, 'Instrument Sans'), sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--text-bright);
}

.sw-unlock-modal-close {
  background: none;
  border: none;
  color: #9a9aa5;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}

.sw-unlock-modal-close:hover {
  color: var(--text-bright);
}

.sw-unlock-modal-body {
  padding: 20px 24px 24px;
}

.sw-unlock-modal-desc {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: #b5b5bf;
  line-height: 1.5;
  text-align: center;
}
.sw-unlock-modal-desc:empty {
  display: none;
}

.sw-pricing-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}

.sw-pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-bright);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sw-pricing-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: color-mix(in srgb, var(--accent-primary) 55%, transparent);
}

.sw-pricing-card-top {
  display: flex;
  flex-direction: column;
}

.sw-pricing-card-title {
  display: flex;
  flex-direction: column;
  height: 84px;
  margin-bottom: 6px;
}

.sw-pricing-card-title-en {
  display: block;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.sw-pricing-card-title-jp {
  font-size: 11px;
  font-weight: 600;
  color: #8a8a95;
  letter-spacing: 0;
  margin-top: 5px;
}

.sw-pricing-card-desc {
  font-size: 12px;
  color: #8a8a95;
  line-height: 1.5;
  height: 36px;
  overflow: hidden;
  margin-bottom: 16px;
}

.sw-pricing-card-price {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  height: 58px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-bottom: 6px;
}

.sw-pricing-card-price-unit {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #8a8a95;
  margin-top: 6px;
}

.sw-pricing-card-cta {
  box-sizing: border-box;
  width: 100%;
  padding: 11px 8px;
  border-radius: 999px;
  background: var(--accent-primary, #3b82f6);
  color: var(--text-pure-white);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  margin-top: 18px;
  margin-bottom: 16px;
}

.sw-pricing-cta-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-bright);
}

.sw-pricing-card-highlight {
  border-color: color-mix(in srgb, var(--accent-primary) 60%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-primary) 16%, transparent), color-mix(in srgb, var(--accent-secondary) 12%, transparent));
}

.sw-pricing-card-highlight:hover {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-primary) 26%, transparent), color-mix(in srgb, var(--accent-secondary) 20%, transparent));
}

.sw-pricing-badge {
  position: absolute;
  top: -11px;
  left: 20px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--accent-primary, #3b82f6);
  color: var(--text-pure-white);
  font-size: 11px;
  font-weight: 700;
}

/* 「日本限定価格」バッジ。「おすすめ」バッジと同居するカード（サブスク）では
   右上に配置してぶつからないようにする。単独のカード（永久ライセンス）では
   左上に置く。 */
.sw-pricing-jp-badge {
  position: absolute;
  top: -11px;
  right: 20px;
  padding: 3px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f43f5e);
  color: var(--text-pure-white);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

#swUnlockLifetime .sw-pricing-jp-badge {
  left: 20px;
  right: auto;
}

/* 海外価格の取り消し線表示。実際の価格（¥150など）の上に小さく表示する。 */
.sw-pricing-price-overseas {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #8a8a95;
  text-decoration: line-through;
  margin-bottom: 2px;
}

.sw-pricing-feature-list {
  list-style: none;
  padding-top: 14px;
  padding-left: 0;
  margin-top: 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sw-pricing-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.4;
}

.sw-pricing-check {
  color: #4ade80;
  font-weight: 800;
  flex-shrink: 0;
}

.sw-pricing-compare-link {
  display: block;
  margin-top: 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--accent-primary, #3b82f6);
  text-decoration: none;
}

.sw-pricing-compare-link:hover {
  text-decoration: underline;
}

/* スマホ幅：4列だと窮屈になるので2列に折り返す */
@media (max-width: 640px) {
  .sw-pricing-cards {
    grid-template-columns: 1fr;
  }
}

/* --- ロック表現：鍵アイコン --- */
.sw-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #9a9aa5;
}

.sw-lock-icon svg {
  width: 100%;
  height: 100%;
}

/* プレイリスト項目：ロック中は半透明＋クリックでブロック */
.playlistItem.sw-locked {
  opacity: 0.45;
  cursor: pointer;
}

.playlistItem.sw-locked .playlist-thumb {
  filter: grayscale(1);
}

/* マーカー項目：ロック中は半透明表示、タイムラインジャンプ不可 */
.pinItem.sw-locked {
  opacity: 0.4;
}

.pinItem.sw-locked .pin-info {
  cursor: pointer;
}

/* ループカウンター表示（AB間ループ: 3 / 5 回） */
#swLoopCounter {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: 0.3px;
  z-index: 5;
  display: none;
}

#swLoopCounter.active {
  display: block;
}

/* 無効化された操作コントロール（Key/Speed等）：見た目を暗くするだけで、
   クリック自体は各関数側(setSpeed/setKeySemitones等)でガードしてモーダルを開く。
   pointer-events: noneにしないのは、無効化中でもクリックさせてモーダルを
   出す必要があるため。 */
.sw-disabled-control {
  opacity: 0.45;
}

/* ============================================================
   【検証用・一時的】swDebugPanel
   リリース前にこのブロックとindex.html内の対応する<div id="swDebugPanel">、
   player-shareware.js末尾のデバッグ用スクリプトを削除すること。
   目立たせるため意図的に警告色（オレンジ）にしている。
   ============================================================ */
#swDebugPanel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  margin-left: 10px;
  border: 1px dashed #f59e0b;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  font-size: 11px;
  font-family: var(--font-body, 'Instrument Sans'), sans-serif;
}

#swDebugStatus {
  font-weight: 700;
  color: #f59e0b;
  padding: 0 4px;
  white-space: nowrap;
}

#swDebugPanel button {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: var(--text-bright);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

#swDebugPanel button:hover {
  background: rgba(245, 158, 11, 0.25);
}

/* スマホ幅でも検証できるよう、非表示にはせず折り返し表示にする。
   ヘッダー内で場所を取りすぎる場合はここを縮小する。 */
@media (max-width: 900px) {
  #swDebugPanel {
    flex-wrap: wrap;
    row-gap: 4px;
    font-size: 10px;
    padding: 3px 6px;
  }
  #swDebugPanel button {
    font-size: 10px;
    padding: 3px 6px;
  }
}

/* ============================================================
   ミニポップアップ（トースト）
   画面中央下段に固定表示。フルモーダルより軽く、操作の流れを止めない。
   ============================================================ */
.sw-unlock-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(20, 20, 24, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-family: var(--font-body, 'Instrument Sans'), sans-serif;
  font-size: 12.5px;
  color: #d8d8de;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 850;
}

.sw-unlock-toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.sw-unlock-toast-link {
  color: var(--accent-primary, #3b82f6);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.sw-unlock-toast-link:hover {
  color: color-mix(in srgb, var(--accent-primary, #3b82f6) 80%, white);
}

/* 幅が狭い場合、テキストとリンクを2行に折り返す */
@media (max-width: 480px) {
  .sw-unlock-toast {
    white-space: normal;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    border-radius: 16px;
    bottom: 16px;
  }
}

/* ============================================================
   UPGRADEボタン（ヘッダー右端、ログインUIの隣）
   目立たせるため、EQ/デバッグパネルとは別系統の暖色グラデーションにする。
   ============================================================ */
#swUpgradeBtn {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  margin-left: 10px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f43f5e);
  color: var(--text-pure-white);
  font-family: var(--font-display, 'Instrument Sans'), sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(244, 63, 94, 0.35);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

#swUpgradeBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.5);
}

#swUpgradeBtn:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  #swUpgradeBtn {
    padding: 8px 10px;
    font-size: 11px;
  }
}
