/**
 * Custom Contact Form - フロントエンドスタイル
 *
 * シンプルで品のあるデザイン
 *
 * @package Custom_Contact_Form
 */

/* ==========================================
   リセット・基本設定
   ========================================== */

.ccf-form-wrapper * {
  box-sizing: border-box;
}

/* ==========================================
   フォームコンテナ
   ========================================== */

.ccf-form-wrapper {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 5px;
}

.ccf-form-container {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .ccf-form-container {
    padding: 30px 20px;
  }
}

/* ==========================================
   エラーメッセージ
   ========================================== */

.ccf-error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
}

.ccf-error-title {
  color: #991b1b;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px 0;
}

.ccf-error-list {
  margin: 0;
  padding-left: 20px;
  color: #dc2626;
  font-size: 14px;
  line-height: 1.6;
}

.ccf-error-list li {
  margin-bottom: 6px;
}

.ccf-error-list li:last-child {
  margin-bottom: 0;
}

/* ==========================================
   フォームフィールド
   ========================================== */

.ccf-form-fields {
  margin-bottom: 30px;
}

.ccf-field-wrapper {
  margin-bottom: 2rem;
}

.ccf-field-wrapper:last-child {
  margin-bottom: 0;
}

.ccf-field-group {
  display: flex;
  flex-direction: column;
}

.ccf-label {
  display: block;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 5px;
  line-height: 1.5;
}

.ccf-required {
  color: #dc2626;
  margin-left: 4px;
  font-weight: 600;
}

.ccf-input,
.ccf-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  color: #1f2937;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1.5;
}

.ccf-input:focus,
.ccf-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ccf-input::placeholder,
.ccf-textarea::placeholder {
  color: #9ca3af;
}

.ccf-textarea {
  resize: vertical;
  min-height: 120px;
}

/* フィールドエラー状態 */
.ccf-has-error .ccf-input,
.ccf-has-error .ccf-textarea {
  border-color: #f87171;
}

.ccf-has-error .ccf-input:focus,
.ccf-has-error .ccf-textarea:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.ccf-field-error {
  color: #dc2626;
  font-size: 13px;
  margin: 6px 0 0 0;
  line-height: 1.4;
}

/* ==========================================
   ボタン
   ========================================== */

.ccf-form-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
  justify-content: center;
}

.ccf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}

.ccf-button-primary {
  background: #3b82f6;
  color: #ffffff;
}

.ccf-button-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.ccf-button-primary:active {
  transform: translateY(0);
}

.ccf-button-secondary {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}

.ccf-button-secondary:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.ccf-button-icon {
  font-size: 14px;
}

@media (max-width: 600px) {
  .ccf-form-actions {
    flex-direction: column;
  }

  .ccf-button {
    width: 100%;
  }
}

/* ==========================================
   確認画面
   ========================================== */

.ccf-confirm-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.ccf-confirm-title {
  color: #111827;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.ccf-confirm-description {
  color: #6b7280;
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

.ccf-confirm-content {
  margin-bottom: 30px;
}

.ccf-confirm-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
}

.ccf-confirm-row:last-child {
  border-bottom: none;
}

.ccf-confirm-label {
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.ccf-confirm-value {
  color: #111827;
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
}

.ccf-confirm-actions {
  justify-content: space-between;
}

@media (max-width: 600px) {
  .ccf-confirm-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ccf-confirm-actions {
    flex-direction: column-reverse;
  }
}

/* ==========================================
   完了画面
   ========================================== */

.ccf-thanks-content {
  text-align: center;
  padding: 40px 20px;
}

.ccf-thanks-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

/* ==========================================
   完了画面のSVGアイコン修正
   ========================================== */

.ccf-thanks-icon svg {
  color: #10b981 !important;
  width: 80px !important;
  height: 80px !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
}

.ccf-thanks-title {
  color: #111827;
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 16px 0;
  line-height: 1.3;
}

.ccf-thanks-message {
  color: #4b5563;
  font-size: 16px;
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .ccf-thanks-content {
    padding: 30px 10px;
  }

  .ccf-thanks-icon svg {
    width: 60px;
    height: 60px;
  }

  .ccf-thanks-title {
    font-size: 24px;
  }

  .ccf-thanks-message {
    font-size: 15px;
  }
}

label.ccf-radio-label {
  padding-right: 20px;
}

/* シンプル版（背景なし） */
.ccf-message-content {
  padding: 0;
  line-height: 1.8;
}
/* ==========================================
   ラジオボタン・チェックボックス
   ========================================== */

.ccf-radio-group,
.ccf-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.ccf-radio-label,
.ccf-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding-right: 0;
  margin: 0;
  white-space: nowrap;
}

.ccf-radio-label input[type="radio"],
.ccf-checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.ccf-radio-label span,
.ccf-checkbox-label span {
  color: #374151;
  font-size: 15px;
  line-height: 1.5;
}

/* スマホで縦並びに */
@media (max-width: 600px) {
  .ccf-radio-group,
  .ccf-checkbox-group {
    flex-direction: column;
    gap: 12px;
  }
}

/* チェックボックス用の追加スタイル */
.ccf-checkbox-note {
  color: #6b7280;
  font-size: 13px;
  margin-top: 8px;
  font-style: italic;
}

/* ==========================================
   アンカー用（スクロール調整）
   ========================================== */

#ccf-form-anchor {
  display: block;
  height: 0;
  margin: 0;
  padding: 0;
  visibility: hidden;
}
