/* ============================================
   ホーム下部／Daisy Drop下部の「お問い合わせ」ブロック専用
   （デザイン元：pp_印刷データ/new_pp/といあわせ.svg）

   .pp-contact の見た目はこのファイルだけで管理する
   ここを直しても他ページには影響しません。

   ※ 固定ページ「お問い合わせ」（/contact/）は別物です。
      そちらは contact-page.css で管理しています。
   ============================================ */

.pp-contact {
    background: var(--pp-green-light);
    padding: var(--pp-sec-pad-t) 0 var(--pp-sec-pad-b);
    /* 上：Information セクションとの区切り線（下は pp-footer の border-top で区切られる） */
    border-top: 1px solid var(--pp-green);
    position: relative;
}

.pp-contact::before {
    content: '\2740 \2740 \2740';
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 28px;
    color: var(--pp-yellow);
    letter-spacing: 16px;
    opacity: 0.5;
}

.pp-contact__inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 var(--pp-page-pad-x);
}

/* ================================================
   外枠：緑パネル（全幅＋padding）→ 中に2カラム
   ================================================ */
.pp-contact__panel {
    position: relative;
    background: var(--pp-green-light);
    border-radius: var(--pp-radius-xl);
    padding: 36px;
    margin-top: 6px;
    box-sizing: border-box;
    overflow: hidden;
}

/* 緑を少し濃く見せる半透明オーバーレイ */
.pp-contact__panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(123, 198, 126, 0.16);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

/* 下部：お花畑（カート／チェックアウトと同じ flower_bottom.svg） */
.pp-contact__panel::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 76%;
    background-image: url('../images/flower_bottom.svg');
    background-size: 100% auto;
    background-position: bottom center;
    background-repeat: no-repeat;
    opacity: 0.65;
    pointer-events: none;
    z-index: 0;
}

.pp-contact__panel > * {
    position: relative;
    z-index: 1;
}

.pp-contact__deco {
    position: absolute;
    top: 20px;
    right: 24px;
    margin-bottom: 0;
    z-index: 2;
}

.pp-contact__flower {
    max-width: 32px;
    margin: 0;
}

/* ---- 2カラム（左：あいさつ＋お名前／メール／タイトル / 右：本文＋送信） ---- */
.pp-contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 10px 30px;
}

/* CF7の外枠を消して、中身をグリッドの子として並べる */
.pp-contact__grid > .wpcf7,
.pp-contact__grid > .wpcf7 > .wpcf7-form {
    display: contents;
}

/* display:contents でグリッドに混ざるCF7の補助要素を除外 */
.pp-contact__grid .screen-reader-response,
.pp-contact__grid .hidden-fields-container {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* 左：名前／メール欄 */
.pp-contact__cf7-fields {
    grid-column: 1;
    text-align: left;
}

.pp-contact__cf7-fields > p {
    margin: 14px 0 0;
}

.pp-contact__cf7-fields > p:first-child {
    margin-top: 14px;
}

.pp-contact__cf7-fields label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--pp-text-light);
}

/* お名前・メール：ラベル文字と入力欄の間（+2px） */
.pp-contact__cf7-fields .wpcf7-form-control-wrap {
    display: block;
    margin-top: 2px;
}

/* 右：左カラム全体の高さに合わせる（下辺を揃える） */
.pp-contact__grid > .pp-contact__main {
    grid-column: 1;
}

.pp-contact__grid .pp-contact__form-wrap {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: stretch;
    height: 100%;
    min-height: 0;
}

.pp-contact__grid .wpcf7-response-output {
    grid-column: 1 / -1;
}

/* ================================================
   左：あいさつ文（緑パネル背景の上に直接配置）
   ※ 見出し〜入力まで左寄せで統一（中央寄せと混ぜると花の左端がずれる）
   ================================================ */
.pp-contact__main {
    text-align: left;
}

/* 共通 .pp-section-title / .midashi_flower の中央寄せを、ここでは打ち消す */
.pp-contact__main .pp-section-title {
    justify-content: flex-start;
    text-align: left;
}

.pp-contact__main .midashi_flower {
    justify-content: flex-start;
}

.pp-contact__desc {
    margin: 0 0 20px;
}

.pp-contact__desc p:first-child {
    margin-top: -16px;
}
.pp-contact__desc p {
    font-size: 14px;
    color: var(--pp-text-body);
    line-height: 1.9;
    margin: 0;
}

.pp-contact__faq-link {
    margin: 0;
    font-size: 14px;
}

.pp-contact__faq-link a {
    color: var(--pp-pink);
    text-decoration: underline;
    font-size: 16px;
    font-weight: 500;
}

.pp-contact__faq-link a:hover { text-decoration: none; }

/* 左カラム内：お名前／メールアドレス */
.pp-contact__main .pp-contact__field {
    margin-top: 20px;
    margin-bottom: 0;
}

.pp-contact__main .pp-contact__field + .pp-contact__field {
    margin-top: 16px;
}

/* ================================================
   右：本文＋送信エリア（白背景＋点線枠）
   ================================================ */
.pp-contact__form {
    width: 100%;
}

.pp-contact__form-wrap {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: var(--pp-radius-xl);
    padding: 28px;
    box-sizing: border-box;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 6px 28px rgba(80, 60, 50, 0.12);
}

.pp-contact__field { margin-bottom: 16px; }

.pp-contact__label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--pp-text-light);
    margin-bottom: 8px; /* ラベルとinputの間（元6px +2px） */
}

.pp-contact__field input,
.pp-contact__field textarea,
.pp-contact .wpcf7-form input[type="text"],
.pp-contact .wpcf7-form input[type="email"],
.pp-contact .wpcf7-form textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    border: 2px solid rgba(123, 198, 126, 0.4);
    border-radius: var(--pp-radius);
    font-family: var(--pp-font);
    font-size: 14px;
    background: var(--pp-cream);
    color: var(--pp-text-body);
    opacity: 0.9;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/*
 * 本文テキストエリア：
 * 囲い（.pp-contact__form-wrap）の下辺が左カラムと揃う高さまで伸ばし、
 * 余白はテキストエリアが埋める（送信ボタンは下に固定）
 */
.pp-contact__form-wrap > p {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 0;
}

.pp-contact__form-wrap .pp-contact__field--textarea,
.pp-contact__form-wrap > p > label {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    min-height: 0;
}

/* textarea を残り高さいっぱいに（flexだけでは伸びない対策） */
.pp-contact__form-wrap .wpcf7-form-control-wrap:has(textarea),
.pp-contact__form-wrap .pp-contact__field--textarea .wpcf7-form-control-wrap {
    flex: 1 1 auto;
    position: relative;
    min-height: 160px;
    margin-top: 2px; /* 本文ラベルと入力欄の間（+2px） */
}

.pp-contact__field--textarea textarea,
.pp-contact__form-wrap textarea,
.pp-contact .wpcf7-form .pp-contact__form-wrap textarea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    min-height: 160px;
    resize: none;
}

.pp-contact__field input:focus,
.pp-contact__field textarea:focus,
.pp-contact .wpcf7-form input[type="text"]:focus,
.pp-contact .wpcf7-form input[type="email"]:focus,
.pp-contact .wpcf7-form textarea:focus {
    outline: none;
    border-color: rgba(123, 198, 126, 0.7);
    box-shadow: 0 0 0 3px rgba(123, 198, 126, 0.15);
    opacity: 1;
}

.pp-contact__field input::placeholder,
.pp-contact__field textarea::placeholder,
.pp-contact .wpcf7-form input::placeholder,
.pp-contact .wpcf7-form textarea::placeholder {
    color: #C4B5A8;
}

/* CF7：右カラム内のラベル文字 */
.pp-contact__form-wrap > label,
.pp-contact__form-wrap .pp-contact__label,
.pp-contact__form-wrap > p > label {
    font-size: 12px;
    font-weight: 700;
    color: var(--pp-text-light);
}

.pp-contact__form-wrap .pp-contact__submit {
    margin-top: 20px;
    flex: 0 0 auto;
    text-align: center;
}

.pp-contact__submit > p {
    margin: 0;
}

/* 送信ボタン（商品ページ「カートに入れる」と同じ見た目） */
.pp-contact__submit .pp-btn,
.pp-contact__submit button[type="submit"],
.pp-contact .wpcf7-form input[type="submit"],
.pp-contact .wpcf7-form button[type="submit"] {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 20px 24px;
    background: #f58690;
    color: #fff;
    border: none;
    box-sizing: border-box;
    outline: 1px dashed #ffffffaa;
    outline-offset: -8px;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 900;
    font-family: var(--pp-font);
    cursor: pointer;
    box-shadow: inset 0 0 0 2px #ffffff88;
    transition: all 0.25s;
    letter-spacing: 0.05em;
}

/* 左右のお花（商品ページと同じ f_yr.svg） */
.pp-contact__submit .pp-btn img,
.pp-contact__submit button[type="submit"] img,
.pp-contact .wpcf7-form button[type="submit"] img {
    width: auto;
    height: 22px;
}

/* CF7がボタン内の改行を <br> にするので消す */
.pp-contact .wpcf7-form button[type="submit"] br {
    display: none;
}

.pp-contact__submit .pp-btn:hover,
.pp-contact__submit button[type="submit"]:hover,
.pp-contact .wpcf7-form input[type="submit"]:hover,
.pp-contact .wpcf7-form button[type="submit"]:hover {
    background: #e87282;
    transform: translateY(-2px);
}

.pp-contact__submit .pp-btn:focus,
.pp-contact__submit button[type="submit"]:focus,
.pp-contact .wpcf7-form input[type="submit"]:focus,
.pp-contact .wpcf7-form button[type="submit"]:focus {
    outline: 1px dashed #ffffffaa;
    outline-offset: -8px;
}

/* ---- スマホ：1カラム ---- */
@media (max-width: 900px) {
    .pp-contact__grid {
        grid-template-columns: 1fr;
        /* お名前input〜「メールアドレス」ラベル間（p の margin-top: 14px）に合わせる */
        gap: 14px;
        align-items: stretch;
    }

    /* gap で間を取るので、先頭欄の上余白は足さない */
    .pp-contact__cf7-fields > p:first-child {
        margin-top: 0;
    }

    .pp-contact__cf7-fields,
    .pp-contact__grid > .pp-contact__main,
    .pp-contact__grid .pp-contact__form-wrap {
        grid-column: 1;
        grid-row: auto;
        align-self: stretch;
        width: 100%;
        height: auto;
    }

    /* 1カラム時は囲いを引き伸ばさない／本文は固定寄り */
    .pp-contact__form-wrap > p,
    .pp-contact__form-wrap .pp-contact__field--textarea,
    .pp-contact__form-wrap > p > label {
        flex: none;
    }

    .pp-contact__form-wrap .wpcf7-form-control-wrap:has(textarea),
    .pp-contact__form-wrap .pp-contact__field--textarea .wpcf7-form-control-wrap {
        flex: none;
        position: static;
        min-height: 0;
    }

    .pp-contact__form-wrap textarea,
    .pp-contact .wpcf7-form .pp-contact__form-wrap textarea {
        position: static;
        height: 160px;
        min-height: 160px;
        resize: vertical;
    }

    .pp-contact__panel {
        padding: 28px;
    }

    .pp-contact__form-wrap {
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .pp-contact__desc p {
        font-size: 12px;
    }

    .pp-contact__submit .pp-btn,
    .pp-contact__submit button[type="submit"],
    .pp-contact .wpcf7-form input[type="submit"],
    .pp-contact .wpcf7-form button[type="submit"] {
        width: 100%;
        min-width: 0;
        padding: 16px 20px;
        font-size: 16px;
    }

    .pp-contact .wpcf7-form button[type="submit"] img {
        height: 18px;
    }
}
