/* ============================================================
   シーズ登録申込フォーム (page-seeds-entry.php)
   SMF クラス（.smf-*）を .p-seeds-entry スコープでオーバーライド
   Figma: fileKey=Zk39t0yUsJ6cO6gflY2mOv nodes 3434-74751/74833/74676/74917
   ============================================================ */

/* ============================================================
   ページレイアウト
   ============================================================ */

.p-seeds-entry {
    background-color: var(--color-white);
}

.p-seeds-entry__main {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px var(--gutter) 100px;
}

.p-seeds-entry__header {
    margin-bottom: 64px;
    padding-bottom: 16px;
}

.p-seeds-entry__en-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.6;
    letter-spacing: 0.36px;
    margin: 0;
}

.p-seeds-entry__title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.5;
    letter-spacing: 0.32px;
    margin: 0;
}

/* 見出し〜フォーム間の説明文 */
.p-seeds-entry__desc {
    margin-bottom: 32px;
}

.p-seeds-entry__desc p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text);
    line-height: 1.75;
    letter-spacing: 0.32px;
    margin: 0;
}

.p-seeds-entry__desc-required {
    color: #ec0000;
}

/* smf-forms-setup.php がラベル内に挿入する必須マーク */
.p-seeds-entry__required {
    font-size: 1rem;
    font-weight: 400;
    color: #ec0000;
    letter-spacing: 0.32px;
    white-space: nowrap;
}

/* ============================================================
   SMF フォームエリア
   smf-form--business のデフォルト 2 カラムを縦積みに変換
   Figma: bg-[rgba(240,249,255,0.5)] p-[80px] gap-[48px]
   .smf-action は .smf-form の外側要素のため、padding-bottom を 0 にして
   .smf-action で背景色・余白を継続させる
   ============================================================ */

.p-seeds-entry .smf-form.smf-form--business {
    background-color: rgba(240, 249, 255, 0.5);
    padding: 80px 80px 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* smf-item: border / margin リセット + 縦積み */
.p-seeds-entry .smf-form--business .smf-item {
    border: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.p-seeds-entry .smf-form--business .smf-item:not(:first-child) {
    border-top: none;
}

/* PC 640px 以上でも縦積みを維持（smf-form--business の 2 カラム flex を上書き） */
@media (min-width: 640px) {
    .p-seeds-entry .smf-form--business .smf-item {
        flex-direction: column;
    }

    .p-seeds-entry .smf-form--business .smf-item__col {
        flex: none;
        max-width: none;
    }

    .p-seeds-entry .smf-form--business .smf-item__col--label {
        flex: none;
        max-width: none;
        border-right: none;
        border-bottom: none;
    }

    .p-seeds-entry .smf-form--business .smf-item__col--controls {
        flex: none;
        max-width: none;
    }
}

/* アイテム列のパディング・背景リセット */
.p-seeds-entry .smf-form--business .smf-item__col {
    padding: 0;
}

.p-seeds-entry .smf-form--business .smf-item__col--label {
    background-color: transparent;
    border: none;
}

/* 非公開希望（seeds_private: hidden_param=true の smf-item--divider smf-hidden-param）
   Figma: bg-[#f2f2f2] rounded-[8px] p-[16px]
   ※ hidden_param=true で付く smf-hidden-param を main.css が display:none !important で
     隠すため、この項目だけ表示を戻す（ラベル列なしのチェックボックスとして表示する設計） */
.p-seeds-entry .smf-item--field-seeds_private {
    display: block !important;
    background-color: #f2f2f2;
    border-radius: 8px;
    padding: 16px;
    border: none;
}

.p-seeds-entry .smf-item--field-seeds_private .smf-item__col {
    padding: 0;
}

/* ============================================================
   ラベル
   Figma: Bold 17px #333 leading-1.7 tracking-0.34px
   ============================================================ */

.p-seeds-entry .smf-item__label {
    margin: 0;
    padding: 0;
}

.p-seeds-entry .smf-item__label__text {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.7;
    letter-spacing: 0.34px;
}

/* 説明テキスト: Regular 16px #666 leading-1.7 */
.p-seeds-entry .smf-item__description {
    font-size: 1rem;
    color: var(--color-text-sub);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

/* ============================================================
   テキスト入力
   Figma: h-[56px] border-[#666] rounded-[8px] px-[16px] py-[12px]
   ============================================================ */

.p-seeds-entry .smf-text-control__control,
.p-seeds-entry .smf-email-control__control,
.p-seeds-entry .smf-tel-control__control,
.p-seeds-entry .smf-url-control__control {
    width: 100%;
    height: 56px;
    padding: 12px 16px;
    border: 1px solid var(--color-text-sub);
    border-radius: 8px;
    font-size: 1rem;
    color: #1a1a1a;
    background-color: var(--color-white);
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.p-seeds-entry .smf-text-control__control:focus,
.p-seeds-entry .smf-email-control__control:focus,
.p-seeds-entry .smf-tel-control__control:focus,
.p-seeds-entry .smf-url-control__control:focus {
    outline: none;
    border-color: var(--color-link);
}

.p-seeds-entry .smf-text-control__control:disabled,
.p-seeds-entry .smf-email-control__control:disabled,
.p-seeds-entry .smf-tel-control__control:disabled,
.p-seeds-entry .smf-url-control__control:disabled {
    background-color: #f2f2f2;
    border-color: #b3b3b3;
    color: #949494;
    cursor: not-allowed;
}

/* ============================================================
   テキストエリア
   Figma: min-h-[149px] border-[#666] rounded-[8px] p-[16px]
   ============================================================ */

.p-seeds-entry .smf-textarea-control__control {
    width: 100%;
    min-height: 149px;
    padding: 16px;
    border: 1px solid var(--color-text-sub);
    border-radius: 8px;
    font-size: 1rem;
    color: #1a1a1a;
    background-color: var(--color-white);
    box-sizing: border-box;
    line-height: 1.7;
    resize: vertical;
    transition: border-color 0.15s;
}

.p-seeds-entry .smf-textarea-control__control:focus {
    outline: none;
    border-color: var(--color-link);
}

.p-seeds-entry .smf-textarea-control__control:disabled {
    background-color: #f2f2f2;
    border-color: #b3b3b3;
    color: #949494;
    cursor: not-allowed;
    resize: none;
}

/* ============================================================
   カテゴリーチェックボックス
   ユーザー登録画面「関心ある分野」と同一 UI（3列グリッド + (?)ツールチップ）
   PC: 3 列グリッド / SP: 1 列
   ============================================================ */

.p-seeds-entry .smf-item--field-seeds_categories .smf-checkboxes-control__control {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 16px;
}

/* 「その他」セル: 会員登録の関心ある分野と同じく、チェックボックスの横にインライン入力欄を表示（1行占有） */
.p-seeds-entry .smf-label.p-seeds-other-cell {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
/* 「その他」必須エラーは入力欄の下段に全幅表示 */
.p-seeds-entry .smf-label.p-seeds-other-cell .p-seeds-other-error {
    flex-basis: 100%;
    margin: 0;
}
.p-seeds-entry .p-seeds-other-input {
    flex: 1;
    min-width: 0;
    height: 48px;
}
.p-seeds-entry .p-seeds-other-input:disabled {
    background-color: #f2f2f2;
    border-color: #b3b3b3;
    color: #949494;
    cursor: not-allowed;
}

/* チェックボックス共通 */
.p-seeds-entry .smf-label label {
    cursor: pointer;
}

.p-seeds-entry .smf-checkbox-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.p-seeds-entry .smf-checkbox-control__control {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border: 2px solid #666;
    border-radius: 4px;
    accent-color: var(--color-link);
    cursor: pointer;
}

.p-seeds-entry .smf-checkbox-control__label {
    font-size: 1rem;
    color: #1a1a1a;
    line-height: 1.6;
    white-space: normal;
}

/* ========== カテゴリー説明ツールチップ（登録画面と同一） ========== */
.p-seeds-entry__tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.p-seeds-entry__tooltip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    border-radius: 50%;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.p-seeds-entry__tooltip-btn:hover,
.p-seeds-entry__tooltip-btn:focus-visible {
    opacity: 0.7;
    outline: none;
}

.p-seeds-entry__tooltip-bubble {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    padding: 8px 16px;
    background: #fbf5e0;
    color: #000;
    font-size: 0.75rem;
    line-height: 1.6;
    border-radius: 4px;
    white-space: normal;
    word-break: break-word;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 20;
    pointer-events: none;
}

.p-seeds-entry__tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 7px 0 7px;
    border-style: solid;
    border-color: #fbf5e0 transparent transparent transparent;
}

@media (hover: hover) {
    .p-seeds-entry__tooltip-wrap:hover .p-seeds-entry__tooltip-bubble {
        opacity: 1;
        visibility: visible;
    }
}

.p-seeds-entry__tooltip-wrap.is-active .p-seeds-entry__tooltip-bubble {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   ファイル添付ボタン
   Figma: border-[#0877d7] rounded-full px-[12px] py-[6px] Bold 16px #0877d7
   ============================================================ */

.p-seeds-entry .smf-file-control .smf-file-control__label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--color-link);
    border-radius: var(--border-radius-full);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-link);
    background-color: var(--color-white);
    background-image: none;
    cursor: pointer;
    white-space: nowrap;
    min-height: 36px;
    transition: opacity 0.15s;
}

.p-seeds-entry .smf-file-control__label:hover {
    opacity: 0.75;
}

/* エラー時: ファイル選択ボタンをテキスト入力と同様の赤枠・赤字にして表示を統一 */
.p-seeds-entry .smf-file-control__control[data-invalid="1"] ~ .smf-file-control__label {
    border-color: #ec0000;
    color: #ec0000;
}

/* ============================================================
   ボタンエリア
   Figma: フォーム背景色（rgba(240,249,255,0.5)）内に上 48px の余白でボタンを配置
   .smf-action は .smf-form の外側要素のため、背景色と padding で視覚的に連続させる
   ============================================================ */

.p-seeds-entry .smf-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    background-color: rgba(240, 249, 255, 0.5);
    padding: 48px 80px 80px;
    margin: 0;
}

/* SMF デフォルトの margin-left をリセット */
.p-seeds-entry .smf-action .smf-button-control + .smf-button-control {
    margin-left: 0;
}

/* 全ボタン共通 */
.p-seeds-entry .smf-action .smf-button-control__control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 16px 40px;
    border-radius: var(--border-radius-full);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.32px;
    cursor: pointer;
    transition: opacity 0.15s;
    background-image: none;
}

/* 確認・送信ボタン (submit) — Figma: bg-[#0877d7] color-white */
.p-seeds-entry .smf-action .smf-button-control__control[type="submit"] {
    background-color: var(--color-link);
    border: none;
    color: var(--color-white);
}

.p-seeds-entry .smf-action .smf-button-control__control[type="submit"]:hover {
    opacity: 0.85;
}

/* 戻るボタン (data-action="back") — Figma: border-[#0877d7] color-[#0877d7] bg-white */
.p-seeds-entry .smf-action .smf-button-control__control[data-action="back"] {
    background-color: var(--color-white);
    border: 1px solid var(--color-link);
    color: var(--color-link);
}

.p-seeds-entry .smf-action .smf-button-control__control[data-action="back"]:hover {
    opacity: 0.85;
}

/* ============================================================
   確認画面の値テキスト
   Figma: Regular 18px #000 leading-1.6
   ============================================================ */

.p-seeds-entry .snow-monkey-form[data-screen="confirm"] .smf-item__controls {
    font-size: 1.125rem;
    color: #000;
    line-height: 1.6;
}

/* ============================================================
   完了画面（提案完了画面と同様に本文の背景色をなくす）
   ============================================================ */

.p-seeds-entry .snow-monkey-form[data-screen="complete"] .smf-form.smf-form--business {
    background-color: transparent;
    padding: 0;
}

/* 完了画面: ボタンエリアは非表示 */
.p-seeds-entry .snow-monkey-form[data-screen="complete"] .smf-action {
    display: none;
}

/* ============================================================
   バリデーションエラー
   ============================================================ */

.p-seeds-entry .smf-error-messages {
    color: #ec0000;
    font-size: 0.9375rem;
}

.p-seeds-entry [data-invalid="1"].smf-text-control__control,
.p-seeds-entry [data-invalid="1"].smf-textarea-control__control {
    border-color: #ec0000;
}

/* ============================================================
   レスポンシブ（SP: 768px 以下）
   ============================================================ */

@media (max-width: 768px) {
    .p-seeds-entry__main {
        padding: 32px var(--gutter) 60px;
    }

    /* フォームエリアパディング縮小（下 0 を維持して .smf-action に継続） */
    .p-seeds-entry .smf-form.smf-form--business {
        padding: 40px 16px 0;
        gap: 24px;
    }

    /* ボタンエリア SP: 縦並び（送信ボタンが上になるよう column-reverse） */
    .p-seeds-entry .smf-action {
        flex-direction: column-reverse;
        gap: 16px;
        padding: 24px 16px 40px;
    }

    /* カテゴリーチェックボックス: 1 列 */
    .p-seeds-entry .smf-item--field-seeds_categories .smf-checkboxes-control__control {
        grid-template-columns: 1fr;
    }

    /* ボタン全幅 */
    .p-seeds-entry .smf-action .smf-button-control {
        width: 100%;
    }

    .p-seeds-entry .smf-action .smf-button-control__control {
        width: 100%;
    }

    /* 戻るボタン SP: テキストリンク */
    .p-seeds-entry .smf-action .smf-button-control__control[data-action="back"] {
        min-height: auto;
        padding: 8px 0;
        background-color: transparent;
        border: none;
        border-radius: 0;
        font-weight: 400;
        text-decoration: underline;
        color: var(--color-link);
        width: auto;
    }
}

/* 送信完了ページ（page-seeds-entry-complete.php）— お問い合わせ完了ページと同一デザイン */
.p-seeds-entry__result-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.p-seeds-entry__result-body p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--color-text);
    margin: 0;
}
.p-seeds-entry__result-actions {
    margin-top: 16px;
}
