/*
 * WordPress固有スタイル
 *
 * assets/css/style.css は design-source/asset/css/style.css の同期コピーとし、
 * WordPressテンプレート・プラグイン固有の調整はこのファイルに集約する。
 */

/* プラグインによる body::after の上書きを避け、微細グレインを html 側へ移す。 */
body::after {
    content: none;
}

html::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.16;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 140px 140px;
}

/* front-page.php はNEWS背景文字をインラインSVGで出力する。 */
.p-news__bg-svg {
    display: block;
    height: 0.95em;
    width: auto;
    fill: currentColor;
}

/* 前後の記事が存在しない場合も、記事ナビの3列配置を維持する。 */
.p-news-detail__nav-link.is-invisible {
    opacity: 0;
    pointer-events: none;
}

/* CF7のsubmitはinput要素のため、共通CSSのアイコン付きボタンをinput用に調整する。 */
input.p-contact__submit {
    display: inline-block;
    min-width: 260px;
    background-color: var(--base);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath fill='white' d='M647-440H160v-80h487L423-744l57-56 320 320-320 320-57-56 224-224z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 24px center;
    background-size: 18px 18px;
    color: var(--white);
    border: 1px solid var(--base);
    font-family: var(--font-body);
    font-size: clamp(15px, 1.6vw, 16px);
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 17px 56px 17px 48px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition:
        background-color 0.2s,
        border-color 0.2s,
        background-position 0.2s ease;
}

input.p-contact__submit:hover {
    background-color: var(--g800);
    border-color: var(--g800);
    background-position: right 20px center;
    cursor: pointer !important;
}

input.p-contact__submit:disabled {
    cursor: not-allowed;
}

.wpcf7 .wpcf7-submit:disabled {
    cursor: default;
}

.p-contact__field .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

.p-contact__consent-row .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    font-size: clamp(13px, 1.5vw, 14px);
    color: var(--base);
    cursor: pointer;
}

.p-contact__consent-row .wpcf7-acceptance input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--base);
    cursor: pointer;
}

.p-contact__consent-row .wpcf7-acceptance a {
    color: var(--base);
    text-decoration: underline;
}

.wpcf7-not-valid-tip {
    display: block;
    margin-top: 6px;
    font-size: clamp(12px, 1.4vw, 13px);
    font-weight: 600;
    color: #e2552b;
}

.p-contact__field input.wpcf7-not-valid,
.p-contact__field select.wpcf7-not-valid,
.p-contact__field textarea.wpcf7-not-valid {
    border-color: #e2552b;
}

.wpcf7-spinner {
    display: none !important;
}

.wpcf7-list-item {
    margin: 0;
}

.p-contact__consent-row .wpcf7-acceptance label::after {
    content: "必須";
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #e2552b;
    vertical-align: middle;
}

@media (min-width: 769px) {
    .p-contact__consent-row .wpcf7-acceptance label::after {
        font-size: 14px;
    }
}
