/**
 * @fileoverview
 * エコ内窓見積りシミュレーション用スタイル
 * 
 * 概要:
 *   - 最大幅640px、中央揃え、レスポンシブ対応
 *   - 入力欄、ボタン、注意書き等のデザイン
 *   - バリデーションエラー表示
 *   - セクションや見出しの装飾
 * 制限事項:
 *   - 画像イラストは未対応
 */

/* --- 全体レイアウト --- */
.ecomado-container {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  padding: 0 0 32px 0;
  box-sizing: border-box;
  font-family: 'Meiryo', 'Hiragino Sans', 'sans-serif';
}

.ecomado-container form{
  max-width: 95vw;
  margin: 0 auto;
}

/* --- ヘッダー --- */
.ecomado-header {
  text-align: left;
  margin-bottom: 16px;
}

.ecomado-header h1 {
  font-size: 1.3em;
  font-weight: bold;
  color: #333;
  margin: 0 0 8px 0;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

.ecomado-image {
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
}
.ecomado-image img {
  width: 100%;
  /* max-width: 300px; */
  height: auto;
}
.ecomado-image2 {
  margin-bottom: 0;
  display: flex;
  justify-content: center;
}
.ecomado-image2 img {
  width: 100%;
  /* max-width: 300px; */
  height: auto;
}

.ecomado-desc {
  font-size: 0.95em;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.5;
}

/* --- セクション --- */
.ecomado-section {
  background: #f5f7fa;
  border-radius: 6px;
  margin-bottom: 16px;
  padding: 12px 10px 16px 10px;
  box-shadow: 0 1px 2px rgba(60,60,60,0.04);
}

.ecomado-section h2 {
  background: #0081CC;
  color: #fff;
  font-size: 1.5em;
  font-weight: bold;
  margin: -12px -10px 12px -10px;
  padding: 6px 10px;
  border-radius: 6px 6px 0 0;
  line-height: 1;
  float: none;
}

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

.ecomado-form-group label {
  display: block;
  font-size: 0.98em;
  font-weight: bold;
  margin-bottom: 4px;
  color: #222;
  letter-spacing: 0.01em;
}
.ecomado-form-group select:disabled {
    background: #eee;
    color: #aaa;
    cursor: not-allowed;
    border: 1px solid #ccc;
  }

/* --- 入力行 --- */
.ecomado-input-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.ecomado-input-row label {
  min-width: 40px;
  font-weight: normal;
  margin-right: 4px;
  color: #444;
}

.ecomado-input-row input[type="number"] {
  width: 80px;
  padding: 4px 6px;
  font-size: 1em;
  border: 1px solid #bbb;
  border-radius: 4px;
  margin-right: 4px;
  background: #fff;
  transition: border 0.2s;
}

.ecomado-input-row input[type="number"]:focus {
  border: 1.5px solid #2a3990;
  outline: none;
  background: #f0f4ff;
}

.ecomado-unit {
  font-size: 0.95em;
  color: #666;
  margin-left: 2px;
}

/* --- セレクトボックス --- */
.ecomado-form-group select {
  padding: 4px 6px;
  font-size: 1em;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  margin-top: 2px;
}

/* --- テキストボックス --- */
.ecomado-form-group input[type="text"]:not([readonly]) {
  margin-bottom: 4px;
}

/* --- 読み取り専用欄 --- */
.ecomado-form-group input[readonly] {
  background: #f0f0f0;
  color: #888;
  border: 1px solid #ddd;
}

/* --- 実質負担額欄 --- */
.ecomado-total {
  background: #ffeaea !important;
  color: #d32f2f !important;
  font-weight: bold;
}

/* --- バリデーションエラー --- */
.ecomado-error {
  color: #d32f2f;
  font-size: 0.92em;
  margin-bottom: 4px;
  margin-left: 44px;
  letter-spacing: 0.01em;
}

/* --- ボタン --- */
.ecomado-btn-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 18px 0 12px 0;
}

.ecomado-btn-red {
  background: #e53935;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  padding: 10px 0;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}

.ecomado-btn-red:hover {
  background: #b71c1c;
}

.ecomado-btn-blue {
  background: #0081CC;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  padding: 10px 0;
  font-size: 1.5em;
  cursor: pointer;
  transition: background 0.2s;
}

.ecomado-btn-blue:hover {
  background: #1a255c;
}

/* --- 注意書き --- */
.ecomado-notes {
  font-size: 0.88em;
  color: #333;
  background: #f9f9f9;
  border-radius: 4px;
  padding: 10px 8px;
  margin-top: 10px;
  line-height: 1.7;
  text-align: left;
}

/* --- レスポンシブ --- */
@media (max-width: 700px) {
  .ecomado-container {
    padding: 0 0 24px 0;
  }
  .ecomado-section {
    padding: 8px 2vw 12px 2vw;
  }
  .ecomado-btn-row button {
    font-size: 0.98em;
    padding: 9px 0;
  }
}

/* 非活性ボタンのスタイル */
.ecomado-btn-blue:disabled {
  background: #ccc !important;
  color: #fff !important;
  cursor: default !important;
  pointer-events: none;
  opacity: 1;
}
.ecomado-btn-blue:disabled:hover,
.ecomado-btn-blue:disabled:active,
.ecomado-btn-blue:disabled:focus {
  background: #ccc !important;
  color: #fff !important;
  cursor: default !important;
  box-shadow: none !important;
}
.ecomado-btn-red:disabled {
  background: #ccc !important;
  color: #fff !important;
  cursor: default !important;
  pointer-events: none;
  opacity: 1;
}
.ecomado-btn-red:disabled:hover,
.ecomado-btn-red:disabled:active,
.ecomado-btn-red:disabled:focus {
  background: #ccc !important;
  color: #fff !important;
  cursor: default !important;
  box-shadow: none !important;
}

/* --- ecomado-mitsumori/index.php から移動 --- */
.radio-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: center;
    min-height: 50px;
}
.radio-btn {
    position: relative;
    display: inline-block;
}
.radio-btn input[type="radio"] {
    display: none;
}
.radio-btn label {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #ccc;
    border-radius: 6px;
    background: #f7f7f7;
    color: #333;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, border 0.2s, color 0.2s;
    min-width: 80px;
    text-align: center;
    user-select: none;
}
.radio-btn input[type="radio"]:checked + label {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
    font-weight: bold;
}
.radio-btn label:active {
    background: #1565c0;
}
.ecomado-text-value {
    min-height: 20px;
    font-size: 1.4em;
    height: 33px;
}
.ecomado-price {
    min-height: 20px;
    font-size: 1.4em;
    height: 33px;
}
.ecomado-all-price {
    min-height: 20px;
    font-size: 1.6em;
    height: 40px;
}
.ecomado-size-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
    justify-content: center;
}
.ecomado-size-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width:30%;
}
.input-unit-wrap {
    display: flex;
    align-items: stretch;
    width:100%;
}
.input-unit-wrap input {
    width: 100%;
    padding: 6px 6px;
    font-size: 1.2em;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    background: #fff;
    outline: none;
    text-align:right;
}
.input-unit-wrap .ecomado-unit {
    display: flex;
    align-items: center;
    padding: 0 5px;
    background: #f7f7f7;
    border: 1px solid #ccc;
    border-left: none;
    border-radius: 0 4px 4px 0;
    font-size: 11px;
    color: #666;
}
.ecomado-size-error {
    color: #d32f2f;
    font-size: 13px;
    margin-bottom: 2px;
    margin-left: 2px;
}

.ecomado-price-sub {
    font-size: 0.8em;
}

.tagify-location-input {
    width: 100%;
    background: #fff;
    box-sizing: border-box;
    text-align: left;
}
.tagify-direction-input{
  width: 100%;
  background: #fff;
  box-sizing: border-box;
  text-align: left;
}

.tagify {
    width: 100% !important;
    background: #fff !important;
}

/* Tagify候補リストをボタン風に */
.tagify__dropdown.custom-location-dropdown .tagify__dropdown__item {
    display: inline-block;
    margin: 4px;
    padding: 4px 12px;
    border-radius: 4px;
    background: #f5f5f5;
    border: 1px solid #ccc;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tagify__dropdown.custom-location-dropdown .tagify__dropdown__item--active,
.tagify__dropdown.custom-location-dropdown .tagify__dropdown__item:hover {
    background: #1976d2;
    color: #fff;
    border-color: #1976d2;
}

.tagify__dropdown.custom-location-dropdown {
    /* カスタムCSS削除：デフォルト挙動に戻す */
}

.ecomado-trash-icon .st0 {
    fill: #888;
    transition: fill 0.2s;
}

.ecomado-trash-img {
    width: 22px;
    height: 22px;
    transition: filter 0.2s;
    display: inline-block;
}

.ecomado-trash-img:hover,
.ecomado-trash-img:active {
    filter: brightness(1) saturate(0) opacity(0.5);
}

.ecomado-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ecomado-modal-dialog {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    padding: 20px 20px 20px 20px;
    min-width: 260px;
    max-width: 90vw;
    text-align: center;
}

.ecomado-modal-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 18px;
    color: #222;
}

.ecomado-modal-btn-row {
    display: flex;
    gap: 18px;
    justify-content: center;
}

.ecomado-modal-btn {
    min-width: 70px;
    padding: 8px 0;
    border-radius: 6px;
    border: none;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ecomado-modal-btn-ok {
    background: #e53935;
    color: #fff;
}

.ecomado-modal-btn-ok:hover {
    background: #b71c1c;
}

.ecomado-modal-btn-cancel {
    background: #eee;
    color: #333;
}

.ecomado-modal-btn-cancel:hover {
    background: #bbb;
    color: #fff;
}


.ecomado-insulation-info {
  margin-top: 10px;
  text-align: right;
}

.ecomado-info-link {
  color: #0066cc;
  text-decoration: none;
  font-size: 14px;
}

.ecomado-info-link:hover {
  text-decoration: underline;
}

.ecomado-insulation-modal {
  max-width: 800px;
  width: 95%;
}

.ecomado-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid #ddd;
}

.ecomado-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.ecomado-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  color: #666;
}

.ecomado-modal-content {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

.ecomado-insulation-image {
  margin-bottom: 20px;
  text-align: center;
}

.ecomado-insulation-img {
  max-width: 100%;
  height: auto;
}

.ecomado-insulation-text {
  line-height: 1.6;
}

.ecomado-insulation-text ul {
  margin: 10px 0;
  padding-left: 20px;
}

.ecomado-insulation-text li {
  margin-bottom: 5px;
}

.ecomado-modal-footer {
  padding: 10px 20px;
  border-top: 1px solid #ddd;
  text-align: center;
}

.ecomado-attention {
  color: #d00;
  margin: 0 0 0 0;
  font-size: 0.8em;
  text-align: left;
}

a.button.search-btn{
  width: 100%;
  margin-top: 10px;
  max-width: 100%;
}
a.button.search-btn span{
  font-size: 0.8em;
  margin-bottom: 5px;
  display: inline-block;
}
a.button.search-btn:hover span{
  text-decoration: underline;
}