/* 全国社協広報紙コンクール2026 - フォームUI v0.9.4 */
.koho-contest-conditional-hidden{display:none!important}
.koho-contest-period-closed{display:none!important}

.koho-contest-form{
  --koho-green:#174e48;
  --koho-green-2:#2f7b6f;
  --koho-green-soft:#edf6f3;
  --koho-line:#cfdad6;
  --koho-field:#fbfcfc;
  --koho-text:#27312f;
  --koho-muted:#66736f;
  --koho-required:#d83b35;
  --koho-optional:#68736f;
  --koho-blue:#285f8f;
  --koho-yellow:#fff4c9;
  color:var(--koho-text);
  line-height:1.7;
}

/* 受付期間・管理者テストの案内 */
.koho-contest-period-notice{
  padding:20px 22px;
  border:1px solid #c9dfd9;
  border-left:5px solid var(--koho-green-2,#2f7b6f);
  background:#f1f8f6;
  border-radius:5px;
  font-weight:700;
  line-height:1.8;
}
.koho-contest-test-notice{
  padding:11px 14px;
  margin-bottom:20px;
  border:1px solid #e4bd54;
  border-left:5px solid #d99b19;
  background:#fff8df;
  border-radius:4px;
  font-size:13px;
  line-height:1.65;
}

/* Elementor標準の必須 * は消し、必須/任意バッジに統一 */
.koho-contest-form .elementor-field-label:after{content:none!important}
.koho-contest-form .elementor-field-group{margin-bottom:24px}
.koho-contest-form .elementor-field-group>.elementor-field-label{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:7px;
  margin-bottom:8px;
  color:#1f2927;
  font-weight:700;
  line-height:1.5;
}
.koho-field-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:22px;
  padding:0 7px;
  border-radius:3px;
  font-size:12px;
  font-weight:700;
  line-height:1;
  letter-spacing:.04em;
  box-sizing:border-box;
}
.koho-field-badge-required{background:var(--koho-required);color:#fff}
.koho-field-badge-optional{background:#f1f3f2;border:1px solid #a9b2af;color:#5d6864}

/* セクション見出し */
.koho-contest-form .elementor-field-type-html{
  margin-top:24px;
  margin-bottom:22px;
}
.koho-contest-form .elementor-field-type-html:first-child{margin-top:0}
.koho-contest-form .elementor-field-type-html h3{
  margin:0 0 14px;
  padding:0 0 9px;
  border-bottom:2px solid #64a79b;
  color:var(--koho-green);
  font-size:clamp(22px,2.4vw,28px);
  font-weight:700;
  line-height:1.45;
  letter-spacing:.02em;
}
.koho-contest-form .elementor-field-type-html p{
  margin:7px 0;
  color:#4f5a57;
  font-size:14px;
  line-height:1.75;
}
.koho-contest-form .elementor-field-group-section_entry_pdf p:first-of-type{
  margin:14px 0 12px;
  padding:12px 14px;
  border-left:5px solid #d6a52f;
  background:var(--koho-yellow);
  color:#3e3b2d;
}
.koho-contest-form .elementor-field-group-section_entry_pdf p:last-of-type{
  padding:12px 14px;
  border:1px solid #d6e4f2;
  background:#eff6fd;
  color:#385b78;
}
.koho-contest-form .elementor-field-group-section_confirm{
  margin-top:38px;
  padding:0;
}
.koho-contest-form .elementor-field-group-section_confirm h4{
  margin:22px 0 8px;
  padding:7px 11px;
  border-left:4px solid #5b9f93;
  background:var(--koho-green-soft);
  color:var(--koho-green);
  font-size:16px;
  font-weight:700;
}
.koho-contest-form .elementor-field-group-section_confirm ul{
  margin:0 0 14px;
  padding-left:1.55em;
}
.koho-contest-form .elementor-field-group-section_confirm li{margin:4px 0;line-height:1.75}

/* テキスト入力 */
.koho-contest-form input.elementor-field[type=text],
.koho-contest-form input.elementor-field[type=email],
.koho-contest-form input.elementor-field[type=tel],
.koho-contest-form input.elementor-field[type=number],
.koho-contest-form select.elementor-field,
.koho-contest-form textarea.elementor-field{
  width:100%;
  min-height:48px;
  padding:11px 13px!important;
  border:1px solid #c5cfcc!important;
  border-radius:4px!important;
  background:var(--koho-field)!important;
  color:#26302e!important;
  box-shadow:none!important;
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
.koho-contest-form textarea.elementor-field{min-height:120px;line-height:1.65}
.koho-contest-form input.elementor-field:focus,
.koho-contest-form select.elementor-field:focus,
.koho-contest-form textarea.elementor-field:focus{
  outline:none!important;
  border-color:var(--koho-green-2)!important;
  background:#fff!important;
  box-shadow:0 0 0 3px rgba(47,123,111,.14)!important;
}
.koho-contest-form input::placeholder,
.koho-contest-form textarea::placeholder{color:#98a19e;opacity:1}
.koho-contest-form .elementor-field-description,
.koho-org-name-help,
.koho-sns-frequency-help{
  width:100%;
  margin-top:6px;
  color:var(--koho-muted);
  font-size:12.5px;
  line-height:1.65;
}
.koho-sns-frequency-help{
  margin-top:-2px;
  margin-bottom:8px;
}

/* ラジオ・チェックボックス */
.koho-contest-form .elementor-field-subgroup{
  display:flex;
  flex-wrap:wrap;
  gap:8px 10px;
  width:100%;
}
.koho-contest-form .elementor-field-option{
  display:flex;
  align-items:flex-start;
  flex:1 1 220px;
  min-width:0;
  padding:9px 11px;
  border:1px solid #d4ddda;
  border-radius:4px;
  background:#fafbfb;
  box-sizing:border-box;
}
.koho-contest-form .elementor-field-option input[type=checkbox],
.koho-contest-form .elementor-field-option input[type=radio]{
  flex:0 0 auto;
  width:17px;
  height:17px;
  margin:3px 8px 0 0;
  accent-color:var(--koho-green-2);
}
.koho-contest-form .elementor-field-option label{
  margin:0;
  color:#303a37;
  cursor:pointer;
  line-height:1.55;
}
@supports selector(.elementor-field-option:has(input:checked)){
  .koho-contest-form .elementor-field-option:has(input:checked){
    border-color:#77aa9f;
    background:#f0f8f5;
  }
}

/* 選択肢の縦長化を抑える：項目ごとに最適な列数へ */
.koho-contest-form :is(
  .elementor-field-group-entry_history,
  .elementor-field-group-distribution_method,
  .elementor-field-group-page_count,
  .elementor-field-group-opening_direction,
  .elementor-field-group-print_color,
  .elementor-field-group-staff_count,
  .elementor-field-group-project_team,
  .elementor-field-group-layout_software,
  .elementor-field-group-sns_usage,
  .elementor-field-group-sns_frequency,
  .elementor-field-group-website_renewal
) .elementor-field-subgroup{display:grid!important;gap:8px 10px}
.koho-contest-form :is(.elementor-field-group-entry_history,.elementor-field-group-distribution_method) .elementor-field-subgroup{grid-template-columns:repeat(2,minmax(0,1fr))}
.koho-contest-form :is(.elementor-field-group-page_count,.elementor-field-group-print_color,.elementor-field-group-project_team,.elementor-field-group-website_renewal) .elementor-field-subgroup{grid-template-columns:repeat(4,minmax(0,1fr))}
.koho-contest-form .elementor-field-group-opening_direction .elementor-field-subgroup{grid-template-columns:repeat(3,minmax(0,1fr))}
.koho-contest-form :is(.elementor-field-group-staff_count,.elementor-field-group-layout_software,.elementor-field-group-sns_usage,.elementor-field-group-sns_frequency) .elementor-field-subgroup{grid-template-columns:repeat(3,minmax(0,1fr))}
.koho-contest-form :is(
  .elementor-field-group-entry_history,
  .elementor-field-group-distribution_method,
  .elementor-field-group-page_count,
  .elementor-field-group-opening_direction,
  .elementor-field-group-print_color,
  .elementor-field-group-staff_count,
  .elementor-field-group-project_team,
  .elementor-field-group-layout_software,
  .elementor-field-group-sns_usage,
  .elementor-field-group-sns_frequency,
  .elementor-field-group-website_renewal
) .elementor-field-option{
  width:auto;
  min-width:0;
  margin:0!important;
}

/* 所属社協名：ラベル／正式名称入力／補足を3段で安定表示 */
.koho-contest-form .elementor-field-group-org_municipality,
.koho-contest-form .koho-org-field{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:flex-start;
}
.koho-contest-form .elementor-field-group-org_municipality>.elementor-field-label,
.koho-contest-form .koho-org-field>.elementor-field-label{
  flex:0 0 100%!important;
  width:100%!important;
  max-width:100%!important;
}
.koho-org-name-wrap{
  display:grid;
  grid-template-columns:max-content minmax(180px,260px) max-content;
  align-items:center;
  gap:10px;
  width:auto;
  max-width:100%;
}
.koho-org-name-wrap input{width:260px!important;max-width:100%;min-width:0}
.koho-org-name-prefix,.koho-org-name-suffix{font-weight:700;white-space:nowrap;color:#33413e}
.koho-contest-form .elementor-field-group-org_municipality .koho-org-name-help,
.koho-contest-form .koho-org-field .koho-org-name-help{flex:0 0 100%;width:100%}

/* PDFアップロード */
.koho-contest-form .elementor-field-group-entry_pdf input[type=file]{
  width:100%;
  padding:14px;
  border:2px dashed #aebfba;
  border-radius:5px;
  background:#fafcfc;
  color:#48534f;
  box-sizing:border-box;
}
.koho-contest-form .elementor-field-group-entry_pdf input[type=file]::file-selector-button{
  margin-right:12px;
  padding:9px 13px;
  border:0;
  border-radius:4px;
  background:#e7efed;
  color:#264f48;
  font-weight:700;
  cursor:pointer;
}

/* 100文字欄 */
.koho-contest-form .elementor-field-group-highlight_point textarea,
.koho-contest-form .elementor-field-group-improvement_point textarea{
  min-height:96px!important;
  height:96px;
  resize:vertical;
}

/* クライアント側エラー */
.koho-client-error{
  width:100%;
  margin-top:7px;
  padding:8px 10px;
  border-left:4px solid var(--koho-required,#d83b35);
  background:#fff1f0;
  color:#b42318;
  font-size:13px;
  line-height:1.55;
}
.koho-contest-form .elementor-message-danger{
  padding:12px 14px;
  border:1px solid #edb7b3;
  border-left:5px solid var(--koho-required);
  border-radius:4px;
  background:#fff4f3;
  color:#9c2b24;
}

/* 「確認画面へ」 */
.koho-contest-form .elementor-field-type-submit{margin-top:12px}
.koho-contest-form .elementor-field-type-submit .elementor-button{
  min-height:52px;
  padding:13px 28px;
  border:1px solid var(--koho-green)!important;
  border-radius:4px!important;
  background:var(--koho-green)!important;
  color:#fff!important;
  font-size:16px;
  font-weight:700;
  letter-spacing:.03em;
  box-shadow:none!important;
  transition:background-color .18s ease,transform .1s ease;
}
.koho-contest-form .elementor-field-type-submit .elementor-button:hover{
  background:#103e39!important;
}
.koho-contest-form .elementor-field-type-submit .elementor-button:active{transform:translateY(1px)}
.koho-contest-form .elementor-field-type-submit .elementor-button:focus-visible{outline:3px solid rgba(47,123,111,.28);outline-offset:3px}

/* 確認画面 */
.koho-confirm-mode .elementor-form-fields-wrapper>.elementor-field-group:not(.koho-confirm-panel){display:none!important}
.koho-contest-form .elementor-form-fields-wrapper>.koho-confirm-panel{width:100%!important;display:none!important;padding:0!important;margin:0!important}
.koho-contest-form.koho-confirm-mode .elementor-form-fields-wrapper>.koho-confirm-panel{display:block!important}
.koho-confirm-box{
  border:1px solid #c9d8d4;
  border-radius:7px;
  background:#fff;
  padding:26px;
  box-shadow:0 4px 18px rgba(24,62,55,.05);
}
.koho-confirm-box h3{margin:0 0 12px;color:var(--koho-green,#174e48);font-size:clamp(22px,2.4vw,28px);line-height:1.45}
.koho-confirm-note{
  padding:12px 14px;
  margin-bottom:22px;
  background:#eef7f4;
  border-left:5px solid #59a99a;
  color:#40504c;
  line-height:1.7;
}
.koho-confirm-section{
  margin:25px 0 8px;
  padding-bottom:7px;
  border-bottom:2px solid #8ab8ae;
  color:var(--koho-green,#174e48);
  font-weight:700;
  font-size:1.08em;
}
.koho-confirm-table{width:100%;border-collapse:collapse;border:1px solid #dbe3e0}
.koho-confirm-table th,.koho-confirm-table td{padding:9px 11px;border-bottom:1px solid #e4e9e7;vertical-align:top;text-align:left;line-height:1.6}
.koho-confirm-table th{width:32%;font-weight:700;background:#f7f9f8;color:#35403d}
.koho-confirm-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:24px}
.koho-confirm-actions button{
  min-width:190px;
  min-height:48px;
  padding:11px 18px;
  border-radius:4px;
  border:1px solid var(--koho-green,#174e48);
  cursor:pointer;
  font-weight:700;
}
.koho-confirm-back{background:#fff;color:var(--koho-green,#174e48)}
.koho-confirm-back:hover{background:#f4f8f7}
.koho-confirm-submit{background:var(--koho-green,#174e48);color:#fff}
.koho-confirm-submit:hover{background:#103e39}
.koho-confirm-submit:disabled{opacity:.5;cursor:not-allowed}
.koho-turnstile-area{display:flex;justify-content:center;margin-top:22px;min-height:65px}
.koho-turnstile-message{text-align:center;color:#b42318;font-size:13px;margin-top:6px}

/* 完了画面。Elementor標準の成功メッセージは重複表示しない。 */
.koho-confirm-mode>.elementor-message-success,
.koho-confirm-mode .elementor-message-success{display:none!important}
.koho-submit-complete{
  padding:24px;
  border:1px solid #b9d9d1;
  border-left:6px solid #4d9b8d;
  background:#f3faf8;
  border-radius:5px;
  line-height:1.8;
  text-align:left;
}
.koho-submit-complete h3{margin:0 0 10px;color:var(--koho-green,#174e48);font-size:1.35em}
.koho-submit-complete p{margin:6px 0}
.koho-reception-display{font-weight:700;font-size:1.1em}

@media(max-width:767px){
  .koho-contest-form .elementor-field-group{margin-bottom:21px}
  .koho-contest-form .elementor-field-type-html{margin-top:28px;margin-bottom:18px}
  .koho-contest-form .elementor-field-type-html h3{font-size:22px}
  .koho-contest-form .elementor-field-option{flex-basis:100%}
  .koho-contest-form :is(.elementor-field-group-entry_history,.elementor-field-group-distribution_method,.elementor-field-group-project_team,.elementor-field-group-sns_frequency) .elementor-field-subgroup{grid-template-columns:1fr}
  .koho-contest-form :is(.elementor-field-group-page_count,.elementor-field-group-opening_direction,.elementor-field-group-print_color,.elementor-field-group-staff_count,.elementor-field-group-layout_software,.elementor-field-group-sns_usage,.elementor-field-group-website_renewal) .elementor-field-subgroup{grid-template-columns:repeat(2,minmax(0,1fr))}
  .koho-org-name-wrap{display:grid;grid-template-columns:1fr;gap:6px;width:100%}
  .koho-org-name-wrap input{width:100%!important}
  .koho-org-name-prefix,.koho-org-name-suffix{white-space:normal}
  .koho-confirm-box{padding:18px 14px}
  .koho-confirm-table th,.koho-confirm-table td{display:block;width:100%;box-sizing:border-box}
  .koho-confirm-table th{border-bottom:0;padding-bottom:3px}
  .koho-confirm-table td{padding-top:3px}
  .koho-confirm-actions button{width:100%;min-width:0}
}

@media(max-width:480px){
  .koho-field-badge{min-width:36px;height:21px;font-size:11px}
  .koho-contest-form input.elementor-field[type=text],
  .koho-contest-form input.elementor-field[type=email],
  .koho-contest-form input.elementor-field[type=tel],
  .koho-contest-form input.elementor-field[type=number],
  .koho-contest-form select.elementor-field,
  .koho-contest-form textarea.elementor-field{font-size:16px!important}
}
