/* ============================================================
   Sol Home – 問い合わせフォーム専用CSS
   Prefix: sol-inq__
   ============================================================ */

/* ── 変数 ── */
.sol-flow-modal {
  --inq-orange:    #ff7a00;
  --inq-orange-lt: #ff9c42;
  --inq-green:     #0f5f30;
  --inq-gray:      #4a5568;
  --inq-border:    rgba(17, 17, 17, 0.12);
  --inq-bg:        #f8f9fa;
  --inq-error:     #ef4444;
  --inq-success:   #22c55e;
}

/* ================================================================
   フォーム全体
   ================================================================ */
.sol-inq-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── フォームグループ ── */
.sol-inq-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: .85rem;
}
.sol-inq-group:last-of-type {
  margin-bottom: 0;
}

/* ── ラベル ── */
.sol-inq-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--inq-gray);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.sol-inq-label .req {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 16px;
  background: var(--inq-orange);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  border-radius: 3px;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.sol-inq-label .opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  height: 16px;
  background: #e2e8f0;
  color: #718096;
  font-size: .68rem;
  font-weight: 700;
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── テキスト入力・テキストエリア ── */
.sol-inq-input,
.sol-inq-textarea,
.sol-inq-select {
  width: 100%;
  padding: .78rem 1rem;
  border: 1.5px solid var(--inq-border);
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;      /* iOS自動ズーム防止（16px以上） */
  font-family: inherit;
  color: #111;
  line-height: 1.5;
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}
.sol-inq-input:focus,
.sol-inq-textarea:focus,
.sol-inq-select:focus {
  outline: none;
  border-color: var(--inq-orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 0, .14);
}
.sol-inq-input::placeholder,
.sol-inq-textarea::placeholder {
  color: #bbb;
  font-size: .9rem;
}
.sol-inq-input.is-error,
.sol-inq-textarea.is-error {
  border-color: var(--inq-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.sol-inq-textarea {
  resize: vertical;
  min-height: 100px;
}
.sol-inq-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23666' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 18px;
  padding-right: 2.5rem;
}

/* ── ラジオグループ ── */
.sol-inq-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.sol-inq-radio-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1rem;
  border: 1.5px solid var(--inq-border);
  border-radius: 999px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  color: var(--inq-gray);
  transition: border-color .18s ease, background .18s ease, color .18s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.sol-inq-radio-label input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.sol-inq-radio-label:has(input:checked),
.sol-inq-radio-label.is-checked {
  background: rgba(255, 122, 0, .1);
  border-color: var(--inq-orange);
  color: var(--inq-orange);
}

/* ── エラーメッセージ ── */
.sol-inq-error-msg {
  font-size: .78rem;
  color: var(--inq-error);
  font-weight: 600;
  display: none;
}
.sol-inq-group.has-error .sol-inq-error-msg {
  display: block;
}

/* ── 区切り（任意項目） ── */
.sol-inq-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1rem 0 .85rem;
  color: #aaa;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
}
.sol-inq-divider::before,
.sol-inq-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* ================================================================
   写真アップロードエリア
   ================================================================ */
.sol-photo-upload {
  position: relative;
}
.sol-photo-dropzone {
  border: 2px dashed var(--inq-border);
  border-radius: 14px;
  padding: 1.4rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
  background: #fafafa;
  position: relative;
}
.sol-photo-dropzone:hover,
.sol-photo-dropzone.is-drag-over {
  border-color: var(--inq-orange);
  background: rgba(255, 122, 0, .04);
}
.sol-photo-dropzone.has-photos {
  border-color: var(--inq-green);
  border-style: solid;
  background: rgba(15, 95, 48, .04);
  padding-bottom: .8rem;
}
.sol-photo-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.sol-photo-icon {
  font-size: 2.2rem;
  margin-bottom: .4rem;
  display: block;
}
.sol-photo-main {
  font-size: .95rem;
  font-weight: 700;
  color: #333;
  margin-bottom: .2rem;
}
.sol-photo-sub {
  font-size: .78rem;
  color: #999;
}

/* ── 選択済みバッジ ── */
.sol-photo-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .6rem;
  padding: .35rem .85rem;
  background: var(--inq-green);
  color: #fff;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
}

/* ── プレビューグリッド ── */
.sol-photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
  position: relative;
  z-index: 1;
}
.sol-photo-preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(15, 95, 48, .3);
  flex-shrink: 0;
}
.sol-photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sol-photo-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, .65);
  border-radius: 50%;
  border: none;
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.sol-photo-hint {
  font-size: .78rem;
  color: #888;
  margin-top: .5rem;
  text-align: center;
}

/* ================================================================
   送信ボタン
   ================================================================ */
.sol-inq-submit-wrap {
  margin-top: 1.25rem;
}
.sol-inq-submit {
  width: 100%;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--inq-orange), var(--inq-orange-lt));
  color: #fff;
  font-size: 1.02rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 56px;
  box-shadow: 0 12px 32px rgba(255, 122, 0, .32);
  transition: opacity .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  letter-spacing: .02em;
}
.sol-inq-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(255, 122, 0, .42);
}
.sol-inq-submit:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}
.sol-inq-submit-note {
  text-align: center;
  font-size: .75rem;
  color: #999;
  margin-top: .55rem;
}

/* ── スピナー ── */
.sol-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sol-spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes sol-spin {
  to { transform: rotate(360deg); }
}

/* ── フォームエラー全体 ── */
.sol-inq-form-error {
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .25);
  border-radius: 8px;
  padding: .85rem 1rem;
  margin-top: .75rem;
  font-size: .86rem;
  color: #c53030;
  font-weight: 600;
  white-space: pre-wrap;
  display: none;
}
.sol-inq-form-error.is-visible {
  display: block;
}

/* ================================================================
   送信完了画面
   ================================================================ */
.sol-inq-success {
  text-align: center;
  padding: 1.5rem .5rem;
}
.sol-inq-success__icon {
  font-size: 3.5rem;
  margin-bottom: .5rem;
  display: block;
}
.sol-inq-success__title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--inq-green);
  margin-bottom: .6rem;
}
.sol-inq-success__body {
  font-size: .9rem;
  color: var(--inq-gray);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.sol-inq-success__reassure {
  display: grid;
  gap: .5rem;
  margin-bottom: 1.25rem;
  text-align: left;
}
.sol-inq-success__reassure-item {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  font-size: .85rem;
  color: var(--inq-gray);
  background: #f8f9fa;
  padding: .6rem .85rem;
  border-radius: 8px;
}
.sol-inq-success__reassure-item::before {
  content: '✓';
  color: var(--inq-green);
  font-weight: 800;
  flex-shrink: 0;
}

/* ================================================================
   送信中画面
   ================================================================ */
.sol-inq-loading {
  text-align: center;
  padding: 2.5rem 1rem;
}
.sol-inq-loading__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 122, 0, .2);
  border-top-color: var(--inq-orange);
  border-radius: 50%;
  animation: sol-spin .8s linear infinite;
  margin: 0 auto 1rem;
}
.sol-inq-loading__text {
  font-size: .95rem;
  font-weight: 700;
  color: var(--inq-gray);
}
.sol-inq-loading__sub {
  font-size: .8rem;
  color: #aaa;
  margin-top: .35rem;
}

/* ================================================================
   エラー画面（送信失敗）
   ================================================================ */
.sol-inq-send-error {
  text-align: center;
  padding: 1.5rem .5rem;
}
.sol-inq-send-error__icon {
  font-size: 3rem;
  margin-bottom: .5rem;
  display: block;
}
.sol-inq-send-error__title {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--inq-error);
  margin-bottom: .5rem;
}
.sol-inq-send-error__body {
  font-size: .88rem;
  color: var(--inq-gray);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.sol-inq-send-error__actions {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.sol-inq-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .85rem 1.5rem;
  border: 2px solid var(--inq-orange);
  border-radius: 10px;
  background: #fff;
  color: var(--inq-orange);
  font-weight: 700;
  font-size: .92rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sol-inq-retry-btn:hover {
  background: rgba(255, 122, 0, .06);
}

/* ================================================================
   ステップ間のヒント・説明文
   ================================================================ */
.sol-inq-step-intro {
  font-size: .88rem;
  color: var(--inq-gray);
  line-height: 1.75;
  margin-bottom: 1rem;
  padding: .7rem .85rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid var(--inq-orange);
}

/* ================================================================
   レスポンシブ – スマホ最適化
   ================================================================ */
@media (max-width: 640px) {
  .sol-inq-input,
  .sol-inq-textarea,
  .sol-inq-select {
    font-size: 16px; /* iOS ズーム防止 */
    padding: .82rem .9rem;
  }
  .sol-inq-radio-group {
    gap: .4rem;
  }
  .sol-inq-radio-label {
    font-size: .84rem;
    padding: .55rem .85rem;
  }
  .sol-photo-preview-item {
    width: 64px;
    height: 64px;
  }
  .sol-inq-submit {
    font-size: .96rem;
    min-height: 54px;
  }
  .sol-inq-success__title {
    font-size: 1.15rem;
  }
  .sol-inq-success__reassure-item {
    font-size: .82rem;
  }
}
