/* Build-free post decorations. Front end: regular post body only.
 * Editor body class is supplied by inc/post-editor.php and is never saved in posts.
 * Keep manual post-content.css and existing .t-rec-* recruitment styles separate.
 */

/* Reuse the theme's existing font files in the TinyMCE iframe as well. */
@font-face { font-family: "Zen Kaku Gothic New"; src: url("../fonts/zenkakugothicnew/ZenKakuGothicNew-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Zen Kaku Gothic New"; src: url("../fonts/zenkakugothicnew/ZenKakuGothicNew-Bold.ttf") format("truetype"); font-weight: 600 900; font-display: swap; }
@font-face { font-family: "Noto Serif JP"; src: url("../fonts/notoserifjp/NotoSerifJP%5Bwght%5D.ttf") format("truetype"); font-weight: 200 900; font-display: swap; }

.single-post .article-content .taihei-decor-box,
body.taihei-post-editor .taihei-decor-box {
    box-sizing: border-box;
    clear: both;
    margin: 28px 0;
    padding: 22px 24px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #25334c;
    font-size: 15px;
    line-height: 2;
    overflow-wrap: anywhere;
}
.single-post .article-content .taihei-decor-box > :first-child,
body.taihei-post-editor .taihei-decor-box > :first-child { margin-top: 0; }
.single-post .article-content .taihei-decor-box > :last-child,
body.taihei-post-editor .taihei-decor-box > :last-child { margin-bottom: 0; }
.single-post .article-content .taihei-decor-box p,
body.taihei-post-editor .taihei-decor-box p { margin-block: 1em; }
.single-post .article-content .taihei-decor-box ul,
.single-post .article-content .taihei-decor-box ol,
body.taihei-post-editor .taihei-decor-box ul,
body.taihei-post-editor .taihei-decor-box ol { margin-block: 1em; padding-left: 1.6em; }
.single-post .article-content .taihei-decor-box ul,
body.taihei-post-editor .taihei-decor-box ul { list-style: disc; }
.single-post .article-content .taihei-decor-box ol,
body.taihei-post-editor .taihei-decor-box ol { list-style: decimal; }
.single-post .article-content .taihei-decor-box--navy,
body.taihei-post-editor .taihei-decor-box--navy { background: #eef2f8; border-color: #d7dfed; }
.single-post .article-content .taihei-decor-box--red,
body.taihei-post-editor .taihei-decor-box--red { background: #fff8f8; border-left: 4px solid #ed1c24; }
.single-post .article-content .taihei-decor-box--yellow,
body.taihei-post-editor .taihei-decor-box--yellow { background: #fff8df; border-color: #edda96; }
.single-post .article-content .taihei-decor-red,
body.taihei-post-editor .taihei-decor-red { color: #c31822; font-weight: 700; }
.single-post .article-content .taihei-decor-marker,
body.taihei-post-editor .taihei-decor-marker { background: #fff0a3; color: #252525; padding-inline: 2px; }
.single-post .article-content .taihei-decor-note,
body.taihei-post-editor .taihei-decor-note { font-size: 12px; color: #626977; line-height: 1.7; }
.single-post .article-content a.taihei-decor-button,
body.taihei-post-editor a.taihei-decor-button {
    display: inline-block;
    box-sizing: border-box;
    max-width: 100%;
    padding: 12px 24px;
    border: 1px solid #001b54;
    border-radius: 4px;
    background: #001b54;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.7;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.single-post .article-content a.taihei-decor-button:hover,
body.taihei-post-editor a.taihei-decor-button:hover { background: #12356e; }
.single-post .article-content img.taihei-decor-image,
body.taihei-post-editor img.taihei-decor-image { border-radius: 10px; box-shadow: 0 4px 16px rgb(0 27 84 / 12%); }

/* The existing site.css already supplies scoped public h2/h3 and image rules.
 * Match those in the iframe without loading the site's reset or global layout.
 */
body.taihei-post-editor { font-family: "Zen Kaku Gothic New", "Yu Gothic", sans-serif; color: #001b54; font-size: 16px; line-height: 1.85; }
body.taihei-post-editor h2 { font-family: "Noto Serif JP", "Yu Mincho", serif; font-size: 26px; font-weight: 600; line-height: inherit; border-left: 2px solid #ed1c24; padding-left: 16px; margin-top: 50px; margin-bottom: 1em; }
body.taihei-post-editor h3 { font-family: "Noto Serif JP", "Yu Mincho", serif; font-size: 22px; font-weight: 600; line-height: inherit; margin-top: 35px; margin-bottom: 1em; }
body.taihei-post-editor img { max-width: 100%; height: auto; }
body.taihei-post-editor .wp-caption { max-width: 100%; }
body.taihei-post-editor iframe { max-width: 100%; }

/* Only YouTube video frames use 16:9; maps/forms and the editor's wpview iframe do not. */
.single-post .article-content iframe:is([src*="//www.youtube.com/embed/"], [src*="//youtube.com/embed/"], [src*="//www.youtube-nocookie.com/embed/"], [src*="//youtube-nocookie.com/embed/"]),
body.taihei-post-editor iframe:is([src*="//www.youtube.com/embed/"], [src*="//youtube.com/embed/"], [src*="//www.youtube-nocookie.com/embed/"], [src*="//youtube-nocookie.com/embed/"]) {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 0;
}
@media (max-width: 720px) {
    body.taihei-post-editor { font-size: 15px; line-height: 2; }
    body.taihei-post-editor h2 { font-size: 23px; }
}
@media (max-width: 480px) {
    .single-post .article-content .taihei-decor-box,
    body.taihei-post-editor .taihei-decor-box { padding: 18px; }
}
