/* ===================================================
   simulation.css  — 見積シミュレーション (2026年改定版)
   全クラスに sn- プレフィックスを付与して既存スタイルと分離
   =================================================== */

/* ===== ページタイトル ===== */
.sn-page-title {
  text-align: center;
  padding: 28px 20px 20px;
}
.sn-page-title h1 {
  font-size: 22px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}
.sn-page-title p {
  font-size: 13px;
  color: #666;
}

/* ===== コンテナ ===== */
.sn-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ===== ステップセクション ===== */
.sn-estimate-step {
  margin-bottom: 28px;
  background: #fff;
  border: 1px solid #ddd;
}
.sn-step-heading {
  background: #3c5a99;
  color: #fff;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sn-step-num {
  background: #fff;
  color: #3c5a99;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
}
.sn-step-required {
  margin-left: auto;
  background: #e55c00;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
}
.sn-step-body {
  padding: 20px;
}

/* ===== プラン選択リスト ===== */
.sn-plan-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}
.sn-plan-list li {
  flex: 1;
  min-width: 110px;
  padding: 12px 8px;
  text-align: center;
  border-right: 1px solid #ddd;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}
.sn-plan-list li:last-child { border-right: none; }
.sn-plan-list li:hover { background: #f8f9ff; }
.sn-plan-list li.selected { background: #e8f0fe; }
.sn-plan-list li.selected::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #3c5a99;
}
.sn-plan-radio {
  display: block;
  margin: 0 auto 5px;
}
.sn-plan-radio input[type="radio"] {
  width: 15px;
  height: 15px;
  accent-color: #3c5a99;
}
.sn-plan-name {
  font-size: 11px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
  line-height: 1.3;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sn-plan-price {
  font-size: 15px;
  font-weight: 700;
  color: #e55c00;
}
.sn-plan-price-unit {
  font-size: 10px;
  font-weight: 400;
  color: #888;
}
.sn-plan-storage {
  font-size: 10px;
  color: #666;
  margin-top: 3px;
  line-height: 1.3;
}

/* ===== 利用人数・範囲 ===== */
.sn-plan-info-area {
  margin-top: 14px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.sn-plan-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sn-plan-info-item label {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}
.sn-plan-info-item label .sn-required {
  color: #e55c00;
  font-size: 11px;
}
.sn-plan-info-field {
  display: flex;
  flex-direction: column;
}
.sn-plan-info-item select {
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
  background: #fff;
  min-width: 160px;
}
.sn-plan-info-item select.sn-invalid {
  border-color: #e55c00;
  background: #fffaf0;
}

/* ===== オプション テーブル ===== */
.sn-option-table {
  width: 100%;
}
.sn-option-table dl {
  display: flex;
  border-bottom: 1px solid #eee;
  margin: 0;
  padding: 0;
}
.sn-option-table dl:last-child { border-bottom: none; }
.sn-option-table dt {
  width: 260px;
  min-width: 260px;
  padding: 12px 16px;
  background: #f8f9fc;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  border-right: 1px solid #eee;
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
}
.sn-option-table dd {
  flex: 1;
  padding: 12px 16px;
  font-size: 13px;
}
.sn-opt-checkbox-area {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.sn-opt-checkbox-area input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #3c5a99;
  cursor: pointer;
}
.sn-opt-use-label {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
}
.sn-opt-desc {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.sn-opt-price {
  font-size: 13px;
  font-weight: 700;
  color: #e55c00;
  margin-top: 4px;
}
.sn-opt-price:empty { display: none; }
.sn-opt-input-area {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sn-opt-input-area select,
.sn-opt-input-area input[type="number"] {
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
  background: #fff;
}
.sn-opt-input-area select { min-width: 220px; }
.sn-opt-input-area input[type="number"] { width: 80px; }
.sn-opt-input-area input[type="number"].sn-input-error,
.sn-opt-input-area select.sn-input-error { border-color: #d32f2f; background: #fff5f5; }
.sn-opt-input-area span { font-size: 12px; color: #666; }
.sn-input-error-msg { display: none; font-size: 11px; color: #d32f2f; margin-top: 3px; }
.sn-input-error-msg.visible { display: block; }

/* ===== オプショングループヘッダー ===== */
.sn-option-group-head {
  background: #e8edf5;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #3c5a99;
  border-bottom: 1px solid #ddd;
  border-top: 1px solid #ddd;
  margin-top: 12px;
}
.sn-option-group-head:first-child { margin-top: 0; border-top: none; }

/* ===== Warm Storage サブオプション ===== */
.sn-sub-options {
  margin-top: 6px;
  padding: 6px 10px;
  background: #fafbfc;
  border: 1px solid #eee;
  border-radius: 3px;
}
.sn-sub-option-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  font-size: 12px;
  color: #444;
}
.sn-sub-option-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #3c5a99;
  cursor: pointer;
}
.sn-sub-option-row label {
  cursor: pointer;
}

/* ===== AI プラングリッド ===== */
.sn-ai-plan-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.sn-ai-plan-item {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 8px 6px;
  text-align: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s;
  background: #fff;
}
.sn-ai-plan-item:hover { border-color: #3c5a99; }
.sn-ai-plan-item.selected { border-color: #3c5a99; background: #e8f0fe; }
.sn-ai-name { font-weight: 700; color: #333; }
.sn-ai-price { color: #e55c00; font-weight: 700; margin-top: 3px; }
.sn-ai-detail { color: #999; font-size: 10px; margin-top: 2px; }

/* ===== IRM/DLP 排他警告 ===== */
.sn-exclusivity-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fff3e0;
  border: 1px solid #ffe0b2;
  border-radius: 3px;
  font-size: 11px;
  color: #e65100;
  margin: 6px 16px 12px;
}

/* ===== ラベル ===== */
.sn-label-standard {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
  margin-left: 4px;
}
.sn-label-new {
  display: inline-block;
  background: #fff3e0;
  color: #e65100;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
  margin-left: 4px;
}
.sn-label-free {
  font-size: 12px;
  color: #2e7d32;
  font-weight: 500;
}

/* ===== 見積結果テーブル ===== */
.sn-result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sn-result-table thead th {
  background: #3c5a99;
  color: #fff;
  padding: 8px 12px;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
}
.sn-result-table thead th:last-child { text-align: right; }
.sn-result-table thead th:nth-child(3),
.sn-result-table thead th:nth-child(4) { text-align: right; }
.sn-result-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}
.sn-result-table tbody td:last-child { text-align: right; font-weight: 500; }
.sn-result-table tbody td:nth-child(3),
.sn-result-table tbody td:nth-child(4) { text-align: right; }
.sn-result-table tbody tr:nth-child(even) { background: #fafbfc; }
.sn-result-table tfoot td {
  padding: 12px;
  font-weight: 700;
  font-size: 15px;
  border-top: 2px solid #3c5a99;
}
.sn-result-table tfoot .sn-total-label { text-align: right; color: #333; }
.sn-result-table tfoot .sn-total-amount { text-align: right; color: #e55c00; font-size: 18px; }
.sn-result-annual {
  text-align: right;
  margin-top: 8px;
  font-size: 13px;
  color: #666;
}
.sn-result-annual strong { color: #333; font-size: 14px; }
.sn-result-actions {
  margin-top: 20px;
  text-align: center;
}

/* ===== ボタン ===== */
.sn-btn {
  padding: 10px 28px;
  border: none;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.sn-btn-primary { background: #ff6600; color: #fff; }
.sn-btn-primary:hover { background: #e55c00; }
.sn-btn-secondary { background: #eee; color: #555; margin-left: 8px; }
.sn-btn-secondary:hover { background: #ddd; }
.sn-btn-blue { background: #3c5a99; color: #fff; }
.sn-btn-blue:hover { background: #2e4a7f; }
.sn-btn-loading {
  background: #7a93c2 !important;
  color: #fff !important;
  cursor: not-allowed !important;
  pointer-events: none;
}
.sn-btn-loading::before {
  content: '';
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: middle;
  animation: sn-spin 0.7s linear infinite;
}
@keyframes sn-spin {
  to { transform: rotate(360deg); }
}

/* ===== ポップアップモーダル ===== */
.sn-popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.sn-popup-overlay.active { display: flex; }
.sn-popup-area {
  background: #fff;
  border-radius: 6px;
  width: 560px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.sn-popup-header {
  background: #3c5a99;
  color: #fff;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px 6px 0 0;
}
.sn-popup-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.sn-popup-close:hover { opacity: 0.7; }
.sn-popup-body { padding: 24px; }
.sn-popup-form-table { width: 100%; }
.sn-popup-form-table dl {
  display: flex;
  border-bottom: 1px solid #eee;
  margin: 0;
  padding: 0;
}
.sn-popup-form-table dt {
  width: 140px;
  min-width: 140px;
  padding: 10px 12px;
  background: #f8f9fc;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.sn-popup-form-table dt .sn-required { color: #e55c00; font-size: 10px; }
.sn-popup-form-table dd { flex: 1; padding: 10px 12px; }
.sn-popup-form-table dd input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 13px;
}
.sn-popup-form-table dd input:focus {
  outline: none;
  border-color: #3c5a99;
  box-shadow: 0 0 0 2px rgba(60,90,153,0.15);
}
.sn-popup-note {
  margin-top: 14px;
  padding: 10px 14px;
  background: #fff9f0;
  border: 1px solid #ffe0b2;
  border-radius: 3px;
  font-size: 12px;
  color: #8b6914;
}
.sn-popup-actions {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.sn-popup-recaptcha {
  margin-top: 10px;
  font-size: 11px;
  color: #666;
  text-align: center;
}
.sn-popup-recaptcha a { color: #4285f4; }
.sn-popup-caution {
  margin-top: 10px;
  padding: 10px 14px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 12px;
  color: #333;
  line-height: 1.6;
}
.sn-popup-caution strong { display: block; margin-bottom: 4px; }
.sn-popup-caution a { color: #4285f4; }

/* ===== ユーティリティ ===== */
.sn-hidden { display: none !important; }
.sn-text-muted { color: #999; }

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .sn-plan-list li { min-width: 46%; flex: none; }
  .sn-option-table dl { flex-direction: column; }
  .sn-option-table dt { width: 100%; min-width: 100%; border-right: none; border-bottom: 1px solid #eee; }
  .sn-ai-plan-grid { grid-template-columns: repeat(2, 1fr); }
  .sn-popup-form-table dl { flex-direction: column; }
  .sn-popup-form-table dt { width: 100%; min-width: 100%; }
  .sn-plan-info-area { flex-direction: column; gap: 10px; }
}
