/* ===================================================
 * contact.css — お問い合わせフォーム
 * =================================================== */

.contact-section {
  background: var(--bg-cream);
  padding: 64px 16px;
  border-top: 1px solid var(--border);
}
.contact-lead {
  text-align: center;
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 36px;
}

/* 送信完了 */
.contact-success[hidden] { display: none; }
.contact-success {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #e6f9ed;
  border: 1px solid #5cb85c;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 28px;
  color: #2d6a30;
  font-size: 14px;
  line-height: 1.7;
}
.contact-success-icon {
  font-size: 22px;
  flex-shrink: 0;
  color: #5cb85c;
  font-weight: 900;
  margin-top: 1px;
}
.contact-success strong { display: block; font-size: 16px; margin-bottom: 4px; }

/* エラーバナー */
.contact-error-banner {
  background: #fff2f3;
  border: 1px solid var(--red);
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 20px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

/* フォーム本体 */
.contact-form {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 36px 40px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}

/* フィールド共通 */
.contact-field { margin-bottom: 24px; }
.contact-field--privacy { margin-top: 8px; }
.contact-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.contact-required {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  flex-shrink: 0;
}
.contact-optional {
  background: #aaa;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Input / Textarea */
.contact-input,
.contact-select,
.contact-textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.contact-input:focus,
.contact-select:focus,
.contact-textarea:focus {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(200,16,46,0.10);
}
.contact-input.is-invalid,
.contact-select.is-invalid,
.contact-textarea.is-invalid {
  border-color: var(--red);
  background: #fff8f8;
}
.contact-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}
.contact-textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 4px;
}
.contact-char-counter {
  font-size: 11px;
  color: var(--text-mid);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: 8px;
}
.contact-char-counter.is-near-limit { color: #e67e00; font-weight: 700; }
.contact-char-counter.is-at-limit   { color: var(--red); font-weight: 700; }

/* セレクトボックスの矢印 */
.contact-select-wrap { position: relative; }
.contact-select-wrap::after {
  content: '▼';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-mid);
  pointer-events: none;
}
.contact-select { padding-right: 36px; }

/* チェックボックスグループ */
.contact-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}
.contact-checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-dark);
  cursor: pointer;
}
.contact-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--red);
  cursor: pointer;
}

/* プライバシー同意 */
.contact-privacy-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dark);
  cursor: pointer;
  line-height: 1.7;
}
.contact-privacy-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--red);
  cursor: pointer;
}
.contact-privacy-link { color: var(--red); text-decoration: underline; }
.contact-privacy-link:hover { opacity: 0.8; }

/* フィールドエラー */
.contact-field-error {
  display: block;
  font-size: 11px;
  color: var(--red);
  font-weight: 700;
  min-height: 16px;
  margin-top: 4px;
}

/* 送信ボタン */
.contact-submit-wrap {
  text-align: center;
  margin-top: 28px;
}
.contact-submit {
  background: var(--red);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  font-family: inherit;
  padding: 18px 52px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(200,16,46,0.40);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: 0.06em;
  width: 100%;
  max-width: 360px;
}
.contact-submit:hover:not(:disabled) {
  background: var(--red-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(200,16,46,0.45);
}
.contact-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.contact-submit-note {
  font-size: 11px;
  color: var(--text-mid);
  margin-top: 10px;
}

/* セキュリティバッジ */
.contact-security {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}
.contact-security-badge {
  font-size: 11px;
  color: var(--text-mid);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-weight: 700;
}

@media (max-width: 680px) {
  .contact-form { padding: 24px 18px; }
  .contact-checkboxes { gap: 8px 14px; }
}
