/* ============================================================
   Ittokai Clinic CTA - Frontend Styles v1.1.3
   ------------------------------------------------------------
   構造:
     .icc-grid (aside)
       └ .icc-grid__heading (見出し)
       └ .icc-grid__cards (grid container)
           └ .icc-card (article) × 3
   ============================================================ */

/* ─── 親: aside ラッパー ─── */
.icc-grid {
    margin: 2em auto;
    padding: 0;
    max-width: 1000px;
    box-sizing: border-box;
}

/* ─── 見出し ─── */
.icc-grid__heading {
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    color: #222;
    margin: 0 0 20px;
    padding-bottom: 12px;
    position: relative;
    line-height: 1.5;
}
.icc-grid__heading::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: #f39800;
    margin: 12px auto 0;
}

/* ─── カードグリッド（親） ───
   PC: 3列グリッド、subgrid対応時は行高さ共有
   スマホ: 1列縦積み
*/
.icc-grid__cards {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 12px;
    box-sizing: border-box;
    width: 100%;
}

@media ( min-width: 768px ) {
    .icc-grid__cards {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 12px;
        row-gap: 0;
    }
    /* subgrid 対応時のみ行を共有（非対応時はカードごとに自然な高さ） */
    @supports ( grid-template-rows: subgrid ) {
        .icc-grid__cards {
            grid-template-rows: repeat(9, auto);
        }
    }
}

/* ─── カード本体 ───
   subgrid 対応ブラウザ: 各行の高さを3カード間で揃える
   subgrid 非対応ブラウザ: 通常の縦スタック（高さ揃わないが表示は崩れない）
*/
.icc-card {
    background: #fff;
    border: 0.5px solid #e0e0e0;
    border-radius: 10px;
    position: relative;
    margin: 0;
    padding: 0;
    max-width: none;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    /* フォールバック: subgrid非対応時は flex として動作 */
    display: flex;
    flex-direction: column;
}

/* subgrid 対応ブラウザでのみ grid として動作 */
@supports ( grid-template-rows: subgrid ) {
    @media ( min-width: 768px ) {
        .icc-card {
            display: grid;
            grid-template-rows: subgrid;
            grid-row: span 9;
        }
    }
}

/* ─── ロゴエリア ─── */
.icc-card__logo {
    padding: 18px 14px 10px;
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    /* カードの角丸に合わせて上角を丸める */
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
}
.icc-card__logo img {
    max-height: 42px;
    max-width: 160px;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    display: block;
}

/* 白系背景の場合、下に境界線を出す（PHP側で付与される --white クラスで判定） */
.icc-card__logo--white {
    border-bottom: 0.5px solid #f0f0f0;
}

/* ─── クリニック名 ─── */
.icc-card__name {
    padding: 10px 14px 14px;
    font-size: 15px;
    font-weight: 500;
    color: #222;
    text-align: center;
    line-height: 1.4;
    border-bottom: 0.5px solid #eee;
    box-sizing: border-box;
    min-height: 1.4em;
}

/* ─── 情報行 ─── */
.icc-card__row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 14px;
    border-bottom: 0.5px dotted #e8e8e8;
    box-sizing: border-box;
}

/* 完全に空の行は非表示。ただしPC subgrid時は高さ確保のため保持、スマホでは消す */
@media (max-width: 767px) {
    .icc-card__row--empty {
        display: none;
    }
}

/* PC時の空行は高さは保持するが視覚的に控えめに（罫線なし） */
@media ( min-width: 768px ) {
    .icc-card__row--empty {
        border-bottom-color: transparent;
    }
}
.icc-card__row-label {
    color: #666;
    font-size: 11px;
    width: 72px;
    flex-shrink: 0;
    padding-top: 3px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    font-weight: 500;
    /* 長いラベルは折り返して表示（領域内に収める） */
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: pre-line;
}
/* ラベルが空の場合は幅を取らない（値が左詰めで表示される） */
.icc-card__row-label:empty {
    width: 0;
    display: none;
}
.icc-card__row-value {
    color: #222;
    font-size: 13px;
    line-height: 1.65;
    flex: 1;
    min-width: 0;
    /* 日本語の1文字折り返しを防ぐ（禁則処理を有効化） */
    word-break: normal;
    overflow-wrap: anywhere;
    line-break: strict;
    /* 改行文字を保持（<br>不使用時の複数行対応） */
    white-space: pre-line;
}

/* 情報行の値内インラインスタイル */
.icc-card__row-value .note {
    color: #999;
    font-size: 11px;
}
.icc-card__row-value .strike {
    color: #999;
    text-decoration: line-through;
}
.icc-card__row-value .hi {
    color: #a8201d;
    font-weight: 500;
}
.icc-card__row-value code {
    font-family: "Courier New", Consolas, monospace;
    background: #f3f3f3;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: #a8201d;
}

/* ─── CTAエリア ─── */
.icc-card__cta {
    padding: 12px 14px 14px;
    margin-top: auto;
    box-sizing: border-box;
}

/* CTAショートコード出力のalk-btn上書き（念のため中央フル幅保証） */
.icc-card__cta .alk-container {
    display: block !important;
    justify-content: center !important;
    width: 100% !important;
}
.icc-card__cta .alk-btn {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

/* #it-content 内に配置された場合のグローバルスタイル上書き */
#it-content .icc-card__row-value code,
.it-article .icc-card__row-value code {
    background: #f3f3f3 !important;
    color: #a8201d !important;
}

/* ittokai-style のグローバルスタイル（ul/ol の三角・番号付け、p のマージン等）を
   .icc-grid 配下では無効化して干渉を防ぐ */
.icc-grid p,
.icc-grid ul,
.icc-grid ol,
.icc-grid li,
.icc-solo p {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
/* .icc-solo ul/li は icc-solo__features 用の ✓ マーカーが必要なので、
   ここでは一律 reset しない。features 側で個別指定 */
.icc-grid ul > li::before,
.icc-grid ol > li::before {
    content: none !important;
    display: none !important;
}

/* ============================================================
   icc/solo（1業者単独CTAブロック）
   ============================================================ */
.icc-solo {
    max-width: 600px;
    width: 100%;
    margin: 2em auto;
    background: #fff;
    border: 0.5px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
}

/* ヘッダー帯（ロゴ上の文言） */
.icc-solo__headline {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.4;
    box-sizing: border-box;
}

/* ロゴエリア */
.icc-solo__logo {
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
}
.icc-solo__logo img {
    max-height: 42px;
    max-width: 200px;
    width: auto !important;
    height: auto !important;
    margin: 0 auto 8px !important;
    display: block;
}
.icc-solo__logo--white {
    border-bottom: 0.5px solid #f0f0f0;
}
.icc-solo__name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
    margin-top: 6px;
}

/* 価格訴求エリア */
.icc-solo__price {
    padding: 18px 20px;
    text-align: center;
    border-top: 0.5px solid #eee;
    border-bottom: 0.5px solid #eee;
    box-sizing: border-box;
}
.icc-solo__price-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    margin-bottom: 10px;
    line-height: 1.5;
    display: inline-block;
    background: #fafafa;
    padding: 4px 14px;
    border-radius: 3px;
}
.icc-solo__price-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.icc-solo__price-before {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}
.icc-solo__price-arrow {
    font-size: 13px;
    color: #666;
}
.icc-solo__price-after {
    font-size: 30px;
    color: #a8201d;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
}
.icc-solo__price-unit {
    font-size: 14px;
    color: #a8201d;
    font-weight: 500;
}
.icc-solo__campaign {
    display: inline-block;
    margin-top: 10px;
    background: #a8201d;
    color: #fff;
    font-size: 11px;
    padding: 4px 14px;
    border-radius: 3px;
    font-weight: 500;
}

/* バナー画像 */
.icc-solo__banner {
    padding: 16px 16px 0;
    box-sizing: border-box;
}
.icc-solo__banner img {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    margin: 0 auto !important;
    border-radius: 6px;
}

/* 特徴リスト
   ittokai-style の `#it-content ul > li::before { content: none !important }` に
   勝つため、セレクタの優先度を上げる（id + class の2重指定で specificity を確保） */
.icc-solo ul.icc-solo__features,
#it-content .icc-solo ul.icc-solo__features,
.it-article .icc-solo ul.icc-solo__features {
    padding: 18px 20px 4px !important;
    list-style: none !important;
    margin: 0 !important;
    font-size: 13px;
    color: #333;
    line-height: 1.8;
    background: none;
    border: none;
}
.icc-solo ul.icc-solo__features li,
#it-content .icc-solo ul.icc-solo__features li,
.it-article .icc-solo ul.icc-solo__features li {
    padding: 8px 0 8px 22px !important;
    position: relative !important;
    list-style: none !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    border-bottom: 0.5px dotted #eee !important;
    display: flex !important;
    align-items: center !important;
    min-height: 28px;
}
.icc-solo ul.icc-solo__features li:last-child,
#it-content .icc-solo ul.icc-solo__features li:last-child,
.it-article .icc-solo ul.icc-solo__features li:last-child {
    border-bottom: none !important;
}
.icc-solo ul.icc-solo__features li::before,
#it-content .icc-solo ul.icc-solo__features li::before,
.it-article .icc-solo ul.icc-solo__features li::before {
    content: '✓' !important;
    position: absolute !important;
    left: 2px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #f39800 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    border: none !important;
    line-height: 1 !important;
}

/* おすすめポイント */
.icc-solo__recommend {
    margin: 10px 20px 16px;
    background: #fff9ec;
    padding: 14px 16px;
    border-radius: 8px;
    box-sizing: border-box;
}
.icc-solo__recommend-label {
    font-size: 11px;
    color: #a86c00;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
}
.icc-solo__recommend-text {
    font-size: 12px;
    color: #555;
    line-height: 1.7;
}

/* CTAボタン */
.icc-solo__cta {
    padding: 0 20px 20px;
    box-sizing: border-box;
}
.icc-solo__cta .alk-container {
    display: block !important;
    justify-content: center !important;
    width: 100% !important;
}
.icc-solo__cta .alk-btn {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

/* #it-content 内配置時のグローバルスタイル上書き */
#it-content .icc-solo,
.it-article .icc-solo {
    margin: 2em auto;
}
