/* ============================================================
   MAROI Premium - タイマー共通スタイル
   ============================================================ */

/* ── ヘッダー残り時間バッジ（2行タイプ） ── */
.header-timer {
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 8px 14px;
  margin-top: 8px;
  color: white;
  transition: background 0.4s ease;
}
.header-timer .ht-row {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}
.header-timer .ht-row + .ht-row { margin-top: 4px; }
.header-timer .ht-label { font-size: 11px; opacity: 0.85; flex-shrink: 0; }
.header-timer .ht-value {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.header-timer .ht-badge {
  font-size: 11px;
  background: rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 1px 8px;
  font-weight: 600;
}

/* アクティビティ種別ごとの背景色 */
.header-timer.act-recording { background: rgba(239,68,68,0.35); }   /* 赤：録音中 */
.header-timer.act-claude_api { background: rgba(59,130,246,0.35); } /* 青：API中 */
.header-timer.act-tts { background: rgba(34,197,94,0.30); }          /* 緑：TTS中 */

/* ── セッション中タイマーカード（アクティビティ表示） ── */
.session-timer-card {
  background: white;
  border-radius: 12px;
  padding: 10px 16px;
  margin: 6px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s;
}
.session-timer-card.act-active {
  box-shadow: 0 0 0 2px rgba(30,136,229,0.4), 0 2px 8px rgba(0,0,0,0.1);
}
.timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.timer-row:last-child { margin-bottom: 0; }
.timer-row .label {
  font-size: 12px;
  color: #888;
}
.timer-row .time-value {
  font-size: 17px;
  font-weight: 700;
  color: #1E88E5;
  font-variant-numeric: tabular-nums;
}

/* アクティビティラベルバッジ */
.activity-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  transition: all 0.3s;
}
.activity-badge.idle       { background: #F0F0F0; color: #888; }
.activity-badge.recording  { background: #FEE2E2; color: #DC2626; animation: pulse-red 1s infinite; }
.activity-badge.claude_api { background: #DBEAFE; color: #2563EB; animation: pulse-blue 1s infinite; }
.activity-badge.tts        { background: #DCFCE7; color: #16A34A; }

@keyframes pulse-red  { 0%,100%{opacity:1} 50%{opacity:0.6} }
@keyframes pulse-blue { 0%,100%{opacity:1} 50%{opacity:0.7} }

/* ── プログレスバー（使用量） ── */
.progress-bar {
  width: 100%;
  height: 5px;
  background: #E0E0E0;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1E88E5, #0D47A1);
  border-radius: 3px;
  transition: width 1s linear;
}
.progress-fill.warning {
  background: linear-gradient(90deg, #FF9800, #F44336);
}

/* ── メニュー画面 使用時間カード ── */
.usage-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.usage-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.usage-card-header .icon { font-size: 22px; }
.usage-card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1A202C;
}
.usage-remaining-value {
  font-size: 28px;
  font-weight: 900;
  color: #1E88E5;
}
.usage-remaining-label {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.usage-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #A0AEC0;
  margin-top: 8px;
}
.usage-reset-info {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #EEF2F7;
  font-size: 12px;
  color: #A0AEC0;
}

/* ── 時間切れモーダル ── */
.time-limit-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}
.modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 10000;
}
.modal-content .modal-icon { font-size: 60px; margin-bottom: 12px; }
.modal-content h2 {
  font-size: 20px;
  font-weight: 800;
  color: #1A202C;
  margin-bottom: 6px;
}
.modal-content .modal-subtitle {
  font-size: 13px;
  color: #718096;
  margin-bottom: 20px;
}
.modal-usage-stats {
  background: #F7FAFC;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
  text-align: left;
}
.modal-usage-stats p {
  font-size: 13px;
  color: #4A5568;
  margin: 6px 0;
}
.modal-purchase-section {
  background: #EBF8FF;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.modal-purchase-section h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1E88E5;
  margin-bottom: 8px;
}
.modal-coming-soon {
  font-size: 15px;
  margin: 8px 0;
}
.modal-purchase-desc {
  font-size: 12px;
  color: #718096;
}
.modal-close-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #1E88E5, #0D47A1);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(30,136,229,0.35);
}
.modal-close-btn:active { transform: scale(.97); opacity: .9; }

/* ── 無効ボタン ── */
.card-btn.time-limit-disabled {
  background: #CBD5E0 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  pointer-events: none;
}

/* ── レスポンシブ ── */
@media (min-width: 480px) {
  .modal-content { padding: 40px 32px; }
}
