/* ========================================
   薬価算定 戦略ツール
   ======================================== */

/* ── Axis Selection ── */
.axis-selection {
  padding: 24px 16px;
  max-width: 640px;
  margin: 0 auto;
}
.axis-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}
.axis-description {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 24px;
}
.axis-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.axis-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, box-shadow .2s, transform .1s;
  font-family: inherit;
  font-size: inherit;
  color: var(--text);
}
.axis-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(26,115,232,.15);
}
.axis-card:active {
  transform: scale(.97);
}
.axis-card-icon {
  font-size: 36px;
  margin-bottom: 8px;
}
.axis-card-label {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.axis-card-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.axis-card-points {
  text-align: left;
  font-size: 12px;
  color: var(--text-secondary);
  list-style: none;
  padding: 0;
}
.axis-card-points li::before {
  content: "▸ ";
  color: var(--primary);
}

/* ── Tool Tabs ── */
.tool-tabs {
  display: flex;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tool-tabs::-webkit-scrollbar { display: none; }
.tool-tab {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.tool-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ── Axis Indicator ── */
.axis-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.axis-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.axis-unlisted {
  background: #e8f5e9;
  color: #1b5e20;
}
.axis-listed {
  background: #fff3e0;
  color: #e65100;
}
.axis-change-btn {
  font-size: 11px;
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}

/* ── Tab Content ── */
.tab-content {
  display: none;
  padding: 16px;
  max-width: 720px;
  margin: 0 auto;
}
.tab-content.active {
  display: block;
}

/* ══════════════════════════════════════
   Checklist Tab
   ══════════════════════════════════════ */
.checklist-section {
  margin-bottom: 24px;
}
.checklist-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 12px;
}
.checklist-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}
.checklist-question {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.required-mark {
  font-size: 10px;
  color: #fff;
  background: var(--accent);
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 500;
}
.checklist-help {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}
.checklist-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.opt-btn {
  padding: 6px 14px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.opt-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.opt-btn.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.checklist-refs {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.qa-ref-btn, .data-ref-btn {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
}

/* ── Checklist Summary ── */
.checklist-result {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
}
.checklist-result h3 {
  font-size: 15px;
  margin-bottom: 12px;
}
.summary-items {
  display: grid;
  gap: 8px;
}
.summary-card {
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 4px solid;
}
.summary-card-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}
.summary-card-content {
  font-size: 13px;
}
.summary-primary { background: #e8f0fe; border-color: #1a73e8; }
.summary-success { background: #e8f5e9; border-color: #2e7d32; }
.summary-warning { background: #fff8e1; border-color: #f9a825; }
.summary-danger  { background: #fce4ec; border-color: #c62828; }
.summary-info    { background: #f3e5f5; border-color: #7b1fa2; }
.summary-neutral { background: #f5f5f5; border-color: #9e9e9e; }

/* ══════════════════════════════════════
   Process Tab
   ══════════════════════════════════════ */
.process-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.process-steps {
  position: relative;
}
.process-step {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: opacity .2s;
}
.process-step.step-dimmed {
  opacity: .4;
}
.step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.step-dimmed .step-number {
  background: #bdbdbd;
}
.step-content {
  flex: 1;
  min-width: 0;
}
.step-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.step-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.step-substeps {
  font-size: 12px;
  padding-left: 16px;
  margin-bottom: 6px;
  color: var(--text);
}
.step-substeps li {
  margin-bottom: 2px;
}
.step-strategy {
  font-size: 12px;
  background: #fff8e1;
  border-left: 3px solid #f9a825;
  padding: 6px 10px;
  margin: 6px 0;
  border-radius: 0 6px 6px 0;
  line-height: 1.5;
}

/* ══════════════════════════════════════
   Components Tab
   ══════════════════════════════════════ */
.comp-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.comp-section {
  margin-bottom: 20px;
}
.comp-section-title {
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.comp-fixed-title {
  background: #f5f5f5;
  color: #616161;
}
.comp-variable-title {
  background: #e8f0fe;
  color: var(--primary);
}
.comp-list {
  display: grid;
  gap: 8px;
}
.comp-card {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}
.comp-card-fixed {
  border-left: 3px solid #9e9e9e;
}
.comp-card-variable {
  border-left: 3px solid var(--primary);
}
.comp-card-variable.imp-critical {
  border-left-color: #c62828;
}
.comp-card-variable.imp-high {
  border-left-color: #e65100;
}
.comp-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.comp-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ── Importance Badges ── */
.imp-badge {
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 8px;
  font-weight: 500;
}
.imp-badge-critical {
  background: #fce4ec;
  color: #c62828;
}
.imp-badge-high {
  background: #fff3e0;
  color: #e65100;
}
.imp-badge-medium {
  background: #f5f5f5;
  color: #616161;
}

/* ══════════════════════════════════════
   Strategy Tab
   ══════════════════════════════════════ */
.strategy-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}
.strategy-phase {
  margin-bottom: 20px;
}
.phase-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 4px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 10px;
}
.strategy-items {
  display: grid;
  gap: 8px;
}
.strategy-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  border-left: 3px solid var(--primary);
}
.strategy-item.imp-critical {
  border-left-color: #c62828;
}
.strategy-item.imp-high {
  border-left-color: #e65100;
}
.strategy-item-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.strategy-item-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ══════════════════════════════════════
   QA Reference Inline Button
   ══════════════════════════════════════ */
.qa-ref-btn-inline {
  font-size: 11px;
  padding: 2px 10px;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  margin-top: 4px;
}
.qa-ref-btn-inline:hover {
  background: var(--primary);
  color: #fff;
}

/* ══════════════════════════════════════
   QA Modal
   ══════════════════════════════════════ */
.qa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.qa-modal {
  background: #fff;
  width: 100%;
  max-width: 720px;
  max-height: 80vh;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.qa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.qa-modal-header h3 {
  font-size: 15px;
}
.qa-modal-close {
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0 4px;
}
.qa-modal-body {
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.qa-modal-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.qa-modal-item {
  background: var(--primary-light);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.qa-modal-item-title {
  font-size: 13px;
  font-weight: 700;
}
.qa-modal-item-section {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.qa-modal-item-answer {
  font-size: 12px;
  line-height: 1.6;
  max-height: 120px;
  overflow-y: auto;
}
.qa-modal-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--primary);
}
.qa-modal-qa {
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.qa-modal-qa:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.qa-modal-qa-num {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.qa-modal-qa-text {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .axis-cards {
    grid-template-columns: 1fr;
  }
  .tab-content {
    padding: 12px;
  }
  .tool-tab {
    font-size: 12px;
    padding: 8px 4px;
  }
}
