/* =============================================
   勤怠管理システム 利用料試算 - スタイル
   ============================================= */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Meiryo", "Yu Gothic", sans-serif;
  background: #f0f4f8;
  color: #333;
  padding: 24px 16px 48px;
  line-height: 1.7;
}

/* ---- コンテナ ---- */
.container {
  max-width: 720px;
  margin: 0 auto;
}

/* ---- タイトル ---- */
h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a3a5c;
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.4;
}

h1 .h1-sub {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: #4a7fa5;
  margin-top: 4px;
}

/* ---- カード ---- */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 28px 32px;
  position: relative;
}

@media (max-width: 480px) {
  .card {
    padding: 20px 16px;
  }
}

/* ---- 区切り線 ---- */
.section-divider {
  border: none;
  border-top: 1px dashed #d0dae4;
  margin: 16px 0;
}

/* ---- フォーム行 ---- */
.form-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}

.label-col {
  flex: 0 0 170px;	
  padding-top: 6px;	
}

@media (max-width: 540px) {
  .form-row {
    flex-direction: column;
    gap: 6px;
  }
  .label-col {
    flex: none;
    padding-top: 0;
  }
}

/* ---- ラベル ---- */
label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a3a5c;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* ---- 任意タグ ---- */
.optional-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: #777;
  background: #eef2f7;
  border: 1px solid #c8d8e8;
  border-radius: 4px;
  padding: 1px 6px;
  letter-spacing: 0.02em;
}


/* ---- 任意タグ改行---- */
.vertical-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* ---- 入力グループ ---- */
.input-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="number"] {
  width: 90px;
  padding: 7px 10px;
  font-size: 1rem;
  font-family: inherit;
  border: 1.5px solid #b0c8dc;
  border-radius: 6px;
  outline: none;
  text-align: right;
  transition: border-color 0.15s;
  background: #fafdff;
  color: #1a3a5c;
}

input[type="number"]:focus {
  border-color: #4a7fa5;
  background: #f0f8ff;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 0.6;
}

.unit {
  font-size: 0.9rem;
  color: #555;
  white-space: nowrap;
}

/* ---- 注釈テキスト ---- */
.rate-note {
  font-size: 0.82rem;
  color: #5a7a96;
}

.sub-note {
  font-size: 0.78rem;
  color: #888;
}

.todo-mark {
  color: #c0392b;
  font-weight: 700;
}

/* ---- 固定料金行 ---- */
.fixed-row label {
  color: #555;
}

.fixed-amount {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a3a5c;
  padding-top: 6px;
}

/* ---- 計算ボタン ---- */
.button-area {
  text-align: center;
  margin: 28px 0;
}

#calcBtn {
  display: inline-block;
  background: #1a6ab5;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  padding: 13px 48px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.05em;
  box-shadow: 0 3px 8px rgba(26, 106, 181, 0.3);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

#calcBtn:hover {
  background: #155a99;
  box-shadow: 0 5px 14px rgba(26, 106, 181, 0.4);
}

#calcBtn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(26, 106, 181, 0.3);
}

/* ---- 結果カード ---- */
.result-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 28px 32px;
  border-top: 4px solid #1a6ab5;
  position: relative;
}

@media (max-width: 480px) {
  .result-card {
    padding: 20px 16px;
  }
}

.result-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0eaf2;
}

/* ---- 結果サマリ ---- */
.result-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f0f7ff;
  border: 1px solid #c8dcee;
  border-radius: 8px;
  padding: 14px 20px;
}

.result-row.sub {
  background: #f7fafb;
  border-color: #dde8ef;
}

.result-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1a3a5c;
}

.result-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a6ab5;
  letter-spacing: 0.02em;
}

.result-row.sub .result-amount {
  font-size: 1.2rem;
  color: #4a7fa5;
}

/* ---- 内訳 ---- */
.breakdown-detail {
  margin-top: 8px;
}

.breakdown-detail summary {
  font-size: 0.85rem;
  color: #4a7fa5;
  cursor: pointer;
  user-select: none;
  padding: 6px 4px;
}

.breakdown-detail summary:hover {
  color: #1a6ab5;
}

.breakdown-table {
  margin-top: 18px;
  font-size: 0.85rem;
  border: 1px solid #dde8ef;
  border-radius: 8px;
  overflow: hidden;
}

.breakdown-table .bd-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid #edf2f7;
}

.breakdown-table .bd-row:last-child {
  border-bottom: none;
}

.breakdown-table .bd-row:nth-child(odd) {
  background: #f9fbfd;
}

.breakdown-table .bd-row.total-row {
  background: #e8f2fb;
  font-weight: 700;
  color: #1a3a5c;
}

.breakdown-table .bd-row.section-header {
  background: #e2ecf5;
  font-weight: 600;
  color: #1a3a5c;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.bd-name { color: #444; }
.bd-amount { color: #1a6ab5; font-weight: 600; }
.bd-zero { color: #aaa; }

/* ---- 免責事項 ---- */
.result-disclaimer {
  font-size: 0.78rem;
  color: #999;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed #dde8ef;
  text-align: center;
}

.price-note {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 0.72rem;
  color: #999;
}

.result-link {
  text-align: center;
  font-size: 0.78rem;
  margin-top: 10px;
}

.result-link a {
  color: #4a7fa5;
  text-decoration: underline;
}

.result-link a:hover {
  color: #1a6ab5;
}

.close-area {
  text-align: center;
  margin-top: 32px;
}

.close-btn {
  background: #eef2f7;
  color: #555;
  border: 1px solid #c8d8e8;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}

.close-btn:hover {
  background: #dde8f2;
  color: #1a3a5c;
}
