/* ===============================================
   Unified Usage Section Styling
   =============================================== */

/* Modern usage card styling for room pages */
.usage-section {
  --usage-card-radius: 20px;
  --usage-header-gradient: var(--primary-gradient);
  --usage-header-accent: rgb(59, 130, 246);
  max-width: 900px;
  margin: 2rem auto;
  background: var(--bg-white);
  border-radius: var(--usage-card-radius);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
}

/*
 * サービス既定色。ルームページ側の個別 `_styles.html` が同じ変数を
 * 上書きしている場合はそちらが引き続き優先される（同値のため実害なし）。
 * これはルーム固有スタイルを持たないページ（例: Note の入口ページ）で
 * usage-section が既定の青のまま出てしまうのを防ぐための fallback。
 *
 * Per-service default color. Room pages that still override the same
 * variables in their own `_styles.html` keep taking precedence (same
 * value, so no visible change). This fallback exists for pages without
 * room-specific styling (e.g. Note's access page) so usage-section
 * doesn't fall back to the generic blue.
 */
.fsqr-section .usage-section {
  --usage-header-gradient: var(--theme-fsqr-gradient);
  --usage-header-accent: var(--theme-fsqr-accent);
}

.group-section .usage-section {
  --usage-header-gradient: var(--theme-group-gradient);
  --usage-header-accent: var(--theme-group-accent);
}

.note-section .usage-section {
  --usage-header-gradient: var(--theme-note-gradient);
  --usage-header-accent: var(--theme-note-accent);
}

.task-section .usage-section {
  --usage-header-gradient: var(--theme-task-gradient);
  --usage-header-accent: var(--theme-task-accent);
}

.usage-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--usage-header-gradient);
  border-top-left-radius: var(--usage-card-radius);
  border-top-right-radius: var(--usage-card-radius);
}

.usage-section-header {
  color: white;
  padding: 1.5rem 2rem;
  text-align: center;
  position: relative;
  border-top-left-radius: var(--usage-card-radius);
  border-top-right-radius: var(--usage-card-radius);
  isolation: isolate;
}

.usage-section-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--usage-header-gradient);
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
  z-index: -1;
}

.usage-section-header::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 8px solid var(--usage-header-accent);
}

.usage-section-header h5 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-family: 'Kaisei Opti', serif;
}

.usage-section-content {
  padding: 2rem 2.5rem;
  text-align: left;
  line-height: 1.7;
  color: var(--text-medium);
}

.usage-section-content p {
  margin: 0;
  font-size: 1rem;
}

.usage-section-content br {
  margin-bottom: 0.5rem;
}

/* Responsive adjustments for usage sections */
@media (max-width: 767.98px) {
  .usage-section {
    margin: 1rem;
    --usage-card-radius: 15px;
    border-radius: var(--usage-card-radius);
  }
  
  .usage-section-header {
    padding: 1.25rem 1.5rem;
  }
  
  .usage-section-header h5 {
    font-size: 1.3rem;
  }
  
  .usage-section-content {
    padding: 1.5rem 1.75rem;
  }
}
