/* static/css/subsidy_simulation.css */
html,body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: 'M PLUS 1p', sans-serif;
  }
  
  .container {
    font-size: 1.2rem;
    width: 90%;
    max-width: 84rem;
    margin: auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    position: relative; /* positionをrelativeに設定します */
    text-align: center; /* 子要素のインライン要素を中央に揃える */
    /* containerの高さは必要に応じて調整してください */
    
  }

  h1 {
    margin-top: 2rem;
    font-size: 1.5rem;
  }

  h2 {
    margin-top: 1rem;
    font-size: 1.2rem;
  }
p {
    text-align: left;
  }
  
  .subsidy-header-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 26vw);
    gap: 1rem;
    align-items: start;
    text-align: left;
  }

  .subsidy-header-left,
  .subsidy-header-right {
    min-width: 0;
  }

  .subsidy-ad-slot {
    width: 100%;
    min-height: 6.25rem;
    border: 0.0625rem dashed #cfc7a4;
    border-radius: 0.75rem;
    background: #ffffff;
    padding: 0.75rem;
    box-sizing: border-box;
  }

  .subsidy-adsense {
    display: block;
    width: 100%;
    min-height: 5.5rem;
  }

  @media (max-width: 48rem) {
    .subsidy-header-layout {
      grid-template-columns: 1fr;
    }

    .subsidy-header-right {
      order: -1;
    }
  }

  .page-header {
    display: block;
    width: auto;
    padding: 0;
    margin-bottom: 1rem;
    box-shadow: none;
  }

  .page-header h1 {
    margin-top: 0;
  }

  .page-header p {
    text-align: left;
    color: #4b5563;
  }

  .red-text {
    color: #898989;
    text-align: center;
    margin-bottom: 0.1rem; /* 下の余白を少なくする */
    font-weight: bold;     /* 任意：文字を濃く見せる */
  }

.input-section {
    margin-bottom: 2rem;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 0.8rem;
    box-shadow: 0 0.2rem 0.4rem rgba(0,0,0,0.1);
}

.input-section label {
    margin-right: 2rem;
    font-weight: bold;
}

.input-section input {
    padding: 0.5rem;
    margin-left: 0.5rem;
    width: 10rem;
}

.salary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background-color: #fff;
}

.salary-table th,
.salary-table td {
    border: 0.1rem solid #ccc;
    padding: 0.8rem;
    text-align: center;
    font-size: 0.9rem;
}

.salary-table input[type="number"] {
    width: 10rem;
    padding: 0.4rem;
    text-align: right;
}


/* 強調用：5年目セル */
.salary-table td.highlight-cell {
    background-color: #fffbe6;
    font-weight: bold;
    border: 2px solid #ffae42;
    color: #000;
}

.result-rate {
    color: #1500ff;
    font-weight: bold;
}

.disclaimer {
    font-size: 0.85rem;
    color: #888;
    margin-top: 1.5rem;
    line-height: 1.5;
}

.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.guide-link {
    text-align: center;
}

#downloadBtn,
#printBtn {
    margin-left: 0.5rem;
}

/* 印刷時は、シミュレーション結果の表だけをA4に収まるよう表示する */
@media print {
    nav,
    footer,
    .input-section,
    .disclaimer,
    .guide-link,
    .subsidy-header-right,
    svg,
    ins.adsbygoogle {
        display: none !important;
    }

    .container {
        max-width: none;
        padding: 0;
    }

    .subsidy-header-layout {
        grid-template-columns: 1fr;
    }

    .salary-table tr {
        break-inside: avoid;
    }
}

@media only screen and (max-width: 600px) {
    .container {
      max-width: 90%;
      padding: 2rem 0;
      margin-top: 1rem; /* 上に余白を追加 */
    }
    /* スマホ表示用にボタンのフォントサイズを調整 */
    .btn {
      font-size: 0.7rem; /* フォントサイズを少し小さく */
      padding: 0.2rem 0.2rem; /* パディングも調整 */
      margin: 0.2rem 0;
    }
    /* スマホ表示用に表のセルのパディングを調整 */
    th, td {
      padding: 0.5rem; /* セル内のパディングを狭く */
    }
  
    /* ボタンと表の枠とのマージンを狭くする */
    .button-container {
      margin-bottom: 0.5rem; /* ボタンと表の間のマージンを狭く */
    }
  }