/* 残業代計算ツール - スライド式UI */

/* 計算ツール全体のコンテナ */
.calculator-slider {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 40px 30px;
}

@media screen and (max-width: 767px) {
  .calculator-slider {
    padding: 30px 20px;
  }
}

/* スライドアイテム */
.calculator-slide-item {
  position: absolute;
  width: 100%;
  left: 0;
  top: 40px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  pointer-events: none;
}

@media screen and (max-width: 767px) {
  .calculator-slide-item {
    top: 30px;
  }
}

.calculator-slide-item.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 質問コンテナ */
.calculator-question {
  min-height: 300px;
  margin-bottom: 20px;
}

@media screen and (max-width: 767px) {
  .calculator-question {
    min-height: 350px;
    margin-bottom: 15px;
  }
}

/* 質問番号 */
.question-number {
  display: inline-block;
  background: #1AC067;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  padding: 8px 20px;
  border-radius: 25px;
  margin-bottom: 15px;
}

@media screen and (max-width: 767px) {
  .question-number {
    font-size: 16px;
    padding: 6px 16px;
    margin-bottom: 12px;
  }
}

/* 質問タイトル */
.question-title {
  font-size: 22px;
  font-weight: bold;
  line-height: 1.5;
  margin-bottom: 25px;
  color: #222;
}

@media screen and (max-width: 767px) {
  .question-title {
    font-size: 18px;
    margin-bottom: 20px;
  }
}

/* 質問コンテンツ */
.question-content {
  margin-bottom: 20px;
}

/* セレクトボックスのスタイル */
.c-select {
  position: relative;
  margin-bottom: 15px;
}

.c-select select {
  width: 100%;
  padding: 12px 40px 12px 15px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.3s ease;
  appearance: none;
}

.c-select select:focus {
  outline: none;
  border-color: #1AC067;
}

.c-select::after {
  content: '▼';
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
  font-size: 12px;
}

@media screen and (max-width: 767px) {
  .c-select select {
    padding: 10px 35px 10px 12px;
    font-size: 14px;
  }
  
  .c-select::after {
    right: 12px;
    font-size: 10px;
  }
}

/* 複数セレクトの横並び */
.select-group {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
}

@media screen and (max-width: 767px) {
  .select-group {
    gap: 10px;
  }
}

.select-group .c-select {
  flex: 1;
  margin-bottom: 0;
}

/* チェックボックス */
.calculator-checkbox {
  display: flex;
  align-items: center;
  font-size: 16px;
  margin-top: 10px;
  cursor: pointer;
}

.calculator-checkbox input[type="checkbox"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

@media screen and (max-width: 767px) {
  .calculator-checkbox {
    font-size: 14px;
  }
  
  .calculator-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
}

/* 注釈 */
.question-note {
  list-style: none;
  padding: 0;
  margin-top: 15px;
  margin-bottom: 40px;
  font-size: 12px;
  line-height: 1.8;
  color: #666;
}

.question-note li {
  margin-bottom: 8px;
}

@media screen and (max-width: 767px) {
  .question-note {
    font-size: 11px;
    margin-bottom: 50px;
    line-height: 1.7;
  }
  
  .question-note li {
    margin-bottom: 10px;
  }
}

/* フォームセクション */
.form-section-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1AC067;
  color: #222;
}

@media screen and (max-width: 767px) {
  .form-section-title {
    font-size: 18px;
    margin-bottom: 15px;
  }
}

/* フォームグループ */
.form-group {
  margin-bottom: 25px;
}

.form-label {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

@media screen and (max-width: 767px) {
  .form-label {
    font-size: 14px;
  }
}

.label-required {
  display: inline-block;
  background: #ff6b6b;
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
}

.label-optional {
  display: inline-block;
  background: #999;
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
}

.form-note-small {
  font-size: 12px;
  color: #666;
  margin: 5px 0;
}

.form-note-description {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin: 10px 0 15px;
}

@media screen and (max-width: 767px) {
  .form-note-description {
    font-size: 12px;
  }
}

/* インプットフィールド */
.c-input {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

.c-input:focus {
  outline: none;
  border-color: #1AC067;
}

/* placeholder のスタイル */
.c-input::placeholder {
  color: #bbb;
  opacity: 1;
}

.c-input::-webkit-input-placeholder {
  color: #bbb;
  opacity: 1;
}

.c-input::-moz-placeholder {
  color: #bbb;
  opacity: 1;
}

.c-input:-ms-input-placeholder {
  color: #bbb;
  opacity: 1;
}

@media screen and (max-width: 767px) {
  .c-input {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* 名前入力（横並び） */
.name-inputs {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

@media screen and (max-width: 767px) {
  .name-inputs {
    gap: 10px;
  }
}

.name-inputs .c-input {
  flex: 1;
}

/* プライバシーチェックボックス */
.privacy-checkbox-wrapper {
  margin: 15px 0;
}

.privacy-checkbox {
  display: flex;
  align-items: flex-start;
  margin-bottom: 5px;
}

.privacy-checkbox input[type="checkbox"] {
  margin: 3px 8px 0 0;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.privacy-checkbox label {
  font-size: 14px;
  line-height: 1.6;
  cursor: pointer;
}

@media screen and (max-width: 767px) {
  .privacy-checkbox label {
    font-size: 12px;
  }
  
  .privacy-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
  }
}

.link-text {
  color: #1AC067;
  text-decoration: underline;
}

.link-text:hover {
  color: #158a4a;
}

.form-description {
  font-size: 14px;
  line-height: 1.6;
  color: #444;
  margin: 10px 0;
}

@media screen and (max-width: 767px) {
  .form-description {
    font-size: 12px;
  }
}

/* ボタン共通スタイル */
.calc-submit-btn,
.calc-back-btn {
  width: 100%;
  background: linear-gradient(135deg, #1AC067 0%, #158a4a 100%);
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  padding: 18px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(26, 192, 103, 0.4);
  margin: 10px 0;
  text-align: center;
  display: block;
}

.calc-submit-btn:hover,
.calc-back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 192, 103, 0.6);
}

.calc-submit-btn:active,
.calc-back-btn:active {
  transform: translateY(0);
}

.calc-submit-btn:disabled,
.calc-back-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}

/* 戻るボタン */
.calc-back-btn {
  background: linear-gradient(135deg, #999 0%, #666 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.calc-back-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ボタングループ */
.button-group {
  display: flex;
  gap: 15px;
  margin: 20px 0;
}

/* 単独の戻るボタン（Q1～Q7用） - question-content内に配置 */
.question-content > .calc-back-btn {
  margin-top: 15px;
}

@media screen and (max-width: 767px) {
  .calc-submit-btn,
  .calc-back-btn {
    font-size: 18px;
    padding: 15px;
  }
  
  .button-group {
    flex-direction: column;
    gap: 10px;
  }
  
  .question-content > .calc-back-btn {
    margin-top: 12px;
  }
}

/* フォーム注釈 */
.form-notes {
  list-style: none;
  padding: 0;
  margin-top: 15px;
  margin-bottom: 50px;
  font-size: 12px;
  line-height: 1.8;
  color: #666;
}

.form-notes li {
  margin-bottom: 8px;
}

@media screen and (max-width: 767px) {
  .form-notes {
    font-size: 11px;
    margin-bottom: 60px;
    line-height: 1.7;
  }
  
  .form-notes li {
    margin-bottom: 10px;
  }
}

/* プログレスバー */
.progress-bar {
  position: relative;
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 10px;
  margin-top: 50px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1AC067 0%, #158a4a 100%);
  border-radius: 10px;
  transition: width 0.4s ease;
}

.progress-text {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-top: 10px;
  margin-bottom: 20px;
  font-weight: bold;
}

.progress-text .current-step {
  color: #1AC067;
  font-size: 18px;
}

@media screen and (max-width: 767px) {
  .progress-bar {
    height: 6px;
    margin-top: 60px;
  }
  
  .progress-text {
    font-size: 12px;
    margin-top: 8px;
    margin-bottom: 15px;
  }
  
  .progress-text .current-step {
    font-size: 16px;
  }
}

/* エラーメッセージ */
.js-vali-err {
  margin-top: 8px;
}

.c-err {
  color: #ff6b6b;
  font-size: 14px;
  font-weight: bold;
  display: block;
  margin-top: 5px;
}

@media screen and (max-width: 767px) {
  .c-err {
    font-size: 12px;
  }
}

/* アニメーション */
@keyframes slideInRight {
  from {
    transform: translateX(50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.calculator-slide-item.active {
  animation: slideInRight 0.4s ease;
}

/* スライド移動時の調整 */
.calculator-slider form {
  position: relative;
}

/* 結果表示画面 */
.calculator-result {
  text-align: center;
  padding: 30px 20px;
}

.result-title {
  font-size: 24px;
  font-weight: bold;
  color: #1AC067;
  margin-bottom: 30px;
}

.result-amount {
  font-size: 48px;
  font-weight: bold;
  color: #1AC067;
  margin: 20px 0;
}

.result-amount .amount-number {
  font-size: 64px;
}

.result-amount .amount-unit {
  font-size: 36px;
}

.result-description {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  margin: 20px 0;
}

.result-note {
  font-size: 12px;
  color: #666;
  line-height: 1.8;
  margin-top: 30px;
  margin-bottom: 50px;
  text-align: left;
}

.result-note li {
  margin-bottom: 8px;
}

@media screen and (max-width: 767px) {
  .result-title {
    font-size: 20px;
    margin-bottom: 20px;
  }
  
  .result-amount {
    font-size: 36px;
    margin: 15px 0;
  }
  
  .result-amount .amount-number {
    font-size: 48px;
  }
  
  .result-amount .amount-unit {
    font-size: 28px;
  }
  
  .result-description {
    font-size: 14px;
  }
  
  .result-note {
    font-size: 11px;
    line-height: 1.7;
    margin-bottom: 60px;
  }
  
  .result-note li {
    margin-bottom: 10px;
  }
}

