@charset "utf-8";
/*------------------------------------------------------------
お知らせ詳細ページWYSIWYGコンテンツ専用スタイルシート
日本調剤ECサイト - responsive_update.html準拠
------------------------------------------------------------*/

/* 基本設定 */
.wysiwyg {
    font-family: "M PLUS Rounded 1c", sans-serif;
    color: #3C4242;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 共通見出し・強調要素設定 */
.wysiwyg h1,
.wysiwyg h2,
.wysiwyg h3,
.wysiwyg h4,
.wysiwyg h5,
.wysiwyg h6,
.wysiwyg strong,
.wysiwyg b {
    font-weight: 700;
}

.wysiwyg h2,
.wysiwyg h3 {
    position: relative;
}

/* 見出しスタイル */
.wysiwyg h1 {
    font-size: 32px;
    line-height: 42px;
    margin: 30px 0 20px 0;
    padding: 0;
    color: #3C4242;
}

.wysiwyg h2 {
    font-size: 28px;
    line-height: 48px;
    margin: 25px 0 25px 0;
    padding: 5px 5px 8px 5px;
    color: #3C4242;
}

.wysiwyg h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #FFC220 0%, #FFC220 40px, #007ADB 40px, #007ADB 100%);
    z-index: 1;
}

.wysiwyg h3 {
    font-size: 20px;
    line-height: 30px;
    margin: 30px 0 20px 0;
    padding: 4px 0 10px 16px;
    border-left: 4px #007ADB solid;
    border-bottom: 2px #E0E5E6 solid;
    background: #FFFFFF;
    z-index: 2;
    color: #3C4242;
}

.wysiwyg h4 {
    font-size: 20px;
    line-height: 27px;
    margin: 15px 0 20px 0;
    padding: 5px 0;
    border-bottom: 1px #B6C0C0 solid;
    color: #3C4242;
}

.wysiwyg h5 {
    font-size: 16px;
    line-height: 24px;
    margin: 12px 0 12px 0;
    padding: 3px 0;
    color: #3C4242;
}

.wysiwyg h6 {
    font-size: 16px;
    line-height: 21px;
    margin: 10px 0 5px 0;
    padding: 2px 0;
    color: #3C4242;
}

/* レスポンシブ見出し */
@media (max-width: 767px) {
    .wysiwyg h1 {
        font-size: 28px;
        line-height: 36px;
        margin: 20px 0 15px 0;
    }
    
    .wysiwyg h2 {
        font-size: 22px;
        line-height: 30px;
        margin: 18px 0 12px 0;
    }
    
    .wysiwyg h3 {
        font-size: 20px;
        line-height: 28px;
        margin: 15px 0 8px 0;
        padding: 6px 0 8px 12px;
    }
    
    .wysiwyg h4 {
        font-size: 18px;
        line-height: 26px;
        margin: 12px 0 6px 0;
    }
    
    .wysiwyg h5 {
        font-size: 16px;
        line-height: 24px;
        margin: 10px 0 5px 0;
    }
    
    .wysiwyg h6 {
        font-size: 14px;
        line-height: 22px;
        margin: 8px 0 4px 0;
    }
}

/* 段落・テキスト要素 - 既存のpスタイルを拡張 */
.wysiwyg p {
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 2.4rem; /* 既存スタイルを維持 */
    word-wrap: break-word;
}

.wysiwyg p:last-child {
    margin-bottom: 0; /* 既存スタイルを維持 */
}

.wysiwyg blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    background: #F2F6F6;
    border-left: 4px solid #007ADB;
    font-size: 16px;
    line-height: 1.7;
    color: #3C4242;
    font-style: italic;
}

.wysiwyg pre {
    background: #F2F6F6;
    border: 1px solid #B6C0C0;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #3C4242;
    white-space: pre-wrap;
}

.wysiwyg div {
    margin: 10px 0;
    line-height: 1.6;
}

/* レスポンシブテキスト */
@media (max-width: 768px) {
    .wysiwyg p,
    .wysiwyg ul,
    .wysiwyg ol,
    .wysiwyg blockquote {
        font-size: 16px;
    }
    
    .wysiwyg p {
        line-height: 24px;
        margin-bottom: 2rem; /* レスポンシブ調整 */
    }
    
    .wysiwyg blockquote {
        padding: 12px 15px;
        margin: 15px 0;
    }
    
    .wysiwyg pre {
        padding: 12px;
        margin: 15px 0;
        font-size: 14px;
    }
}

/* リスト要素 */
.wysiwyg ul,
.wysiwyg ol {
    margin: 15px 0;
    padding-left: 30px;
    font-size: 16px;
    line-height: 1.8;
    color: #3C4242;
}

.wysiwyg ul {
    list-style-type: disc;
}

.wysiwyg ol {
    list-style-type: decimal;
}

.wysiwyg li {
    margin: 8px 0;
    padding: 0;
    word-wrap: break-word;
}

.wysiwyg ul ul,
.wysiwyg ol ol,
.wysiwyg ul ol,
.wysiwyg ol ul {
    margin: 5px 0;
    padding-left: 25px;
    font-size: inherit;
}

.wysiwyg ul ul {
    list-style-type: circle;
}

.wysiwyg ul ul ul {
    list-style-type: square;
}

/* レスポンシブリスト */
@media (max-width: 768px) {
    .wysiwyg ul,
    .wysiwyg ol {
        padding-left: 20px;
        line-height: 1.8;
        margin: 12px 0;
    }
    
    .wysiwyg li {
        margin: 6px 0;
    }
    
    .wysiwyg ul ul,
    .wysiwyg ol ol,
    .wysiwyg ul ol,
    .wysiwyg ol ul {
        padding-left: 15px;
        margin: 3px 0;
    }
}

/* インライン要素 */
.wysiwyg strong,
.wysiwyg b {
    color: #3C4242;
}

.wysiwyg u {
    text-decoration: underline;
    text-decoration-color: #007ADB;
    text-underline-offset: 2px;
}

.wysiwyg span {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.wysiwyg span.custom-class {
    color: #007ADB;
    font-weight: 500;
}

.wysiwyg br {
    line-height: 1.8;
}

/* 画像 - 既存のwp-block-imageスタイルを拡張 */
.wysiwyg img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wysiwyg .wp-block-image {
    margin: 0 0 4.3rem; /* 既存スタイルを維持 */
}

.wysiwyg img[style*="float: left"] {
    margin: 0 15px 15px 0;
    display: inline-block;
}

.wysiwyg img[style*="float: right"] {
    margin: 0 0 15px 15px;
    display: inline-block;
}

/* レスポンシブ画像 */
@media (max-width: 768px) {
    .wysiwyg img {
        margin: 15px 0;
    }
    
    .wysiwyg img[style*="float"] {
        float: none !important;
        display: block;
        margin: 15px auto;
    }
}

/* リンク */
.wysiwyg a {
    color: #007ADB;
    text-decoration: underline;
    text-decoration-color: #007ADB;
    text-underline-offset: 2px;
    transition: all 0.3s ease;
}

.wysiwyg a:hover {
    opacity: 0.7;
}

.wysiwyg a[target="_blank"]:after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0.7;
}

.wysiwyg a[role="button"] {
    display: inline-block;
    padding: 8px 16px;
    background: #007ADB;
    color: white;
    border-radius: 4px;
    border-bottom: none;
    text-align: center;
    font-weight: 500;
}

.wysiwyg a[role="button"]:hover {
    opacity: 0.7;
}

/* レスポンシブリンク */
@media (max-width: 768px) {
    .wysiwyg a[role="button"] {
        padding: 10px 20px;
        display: block;
        text-align: center;
        margin: 10px 0;
    }
}

/* ボタン要素 */
.wysiwyg button {
    background: #007ADB;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-family: inherit;
}

.wysiwyg button:hover {
    opacity: 0.8;
}

/* レスポンシブボタン */
@media (max-width: 768px) {
    .wysiwyg button {
        display: block;
        margin: 15px auto;
        max-width: 90%;
    }
    
    .wysiwyg button[style*="width: 320px"] {
        width: 280px !important;
        max-width: 90% !important;
        font-size: 14px !important;
        padding: 10px 20px !important;
    }
}

/* テーブル */
.wysiwyg table,
.wysiwyg table.table-bordered {
    border-collapse: collapse;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #B6C0C0;
    width: 100%;
    margin: 20px 0;
}

.wysiwyg table th,
.wysiwyg table td,
.wysiwyg table.table-bordered th,
.wysiwyg table.table-bordered td {
    padding: 12px 15px;
    border: 1px solid #B6C0C0;
    word-break: break-word;
}

.wysiwyg table th {
    background-color: #F2F6F6;
    font-weight: 700;
}

/* レスポンシブテーブル */
@media (max-width: 768px) {
    .wysiwyg table {
        margin: 15px 0;
        table-layout: auto;
    }
    
    .wysiwyg table th,
    .wysiwyg table td {
        padding: 8px 6px;
        white-space: normal;
        word-wrap: break-word;
        hyphens: auto;
    }
}

/* フレックスレイアウトのレスポンシブ対応 */
@media (max-width: 768px) {
    /* 組み合わせた例(2) - flex→縦並び */
    .wysiwyg div[style*="display: flex"][style*="gap: 30px"][style*="align-items: flex-start"] {
        flex-direction: column !important;
        gap: 20px !important;
        align-items: center !important;
    }
    
    /* 組み合わせた例(3) - バナーレイアウト→縦並び */
    .wysiwyg div[style*="display: flex"][style*="gap: 30px"][style*="align-items: center"] {
        flex-direction: column !important;
        gap: 20px !important;
        text-align: center !important;
    }
    
    /* 3バナーレイアウト→縦並び */
    .wysiwyg div[style*="display: flex"][style*="gap: 16px"][style*="justify-content: center"] {
        flex-direction: column !important;
        gap: 16px !important;
        align-items: center !important;
    }
    
    /* 3バナー個別要素→幅調整 */
    .wysiwyg div[style*="flex: 1"][style*="min-width: 0"][style*="max-width: 320px"] {
        flex: none !important;
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
    }
    
    /* バナーセクションのレスポンシブ調整 */
    .wysiwyg div[style*="background: #f0f4f8"] {
        padding: 20px 15px !important;
        margin: 20px 0 !important;
    }
    
    .wysiwyg div[style*="background: #f0f4f8"] h2 {
        font-size: 24px !important;
        margin-bottom: 15px !important;
    }
}

/* インデント対応 */
.wysiwyg p[style*="margin-left: 25px"] {
    margin-left: 25px;
}

.wysiwyg p[style*="margin-left: 50px"] {
    margin-left: 50px;
}

/* テキスト配置 */
.wysiwyg p[style*="text-align: center"],
.wysiwyg h1[style*="text-align: center"] {
    text-align: center;
}

.wysiwyg p[style*="text-align: right"],
.wysiwyg h1[style*="text-align: right"] {
    text-align: right;
}

/* カラー・背景色対応 */
.wysiwyg span[style*="background-color"] {
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

.wysiwyg font[color] {
    color: inherit;
}

/* レスポンシブでインデント調整 */
@media (max-width: 768px) {
    .wysiwyg p[style*="margin-left: 25px"] {
        margin-left: 15px;
    }
    
    .wysiwyg p[style*="margin-left: 50px"] {
        margin-left: 25px;
    }
}