/*
 * 2266g7wh49a modern page headers
 *
 * 対象:
 * - 仕訳管理
 * - 会計送信一覧
 *
 * ヘッダー密度だけをホーム画面相当へ統一する。
 * KPI、フィルタ、テーブル、業務ロジックには触れない。
 */

/* ============================================================
 * 仕訳管理
 * ============================================================ */

body.taxai-journals-modern-header-v2266g7wh49a
.taxai-modern-journal-hero-v2266g7wh49a {
    min-height: 0 !important;
    height: auto !important;

    padding:
        clamp(22px, 2vw, 34px)
        clamp(24px, 2.6vw, 44px) !important;

    gap: clamp(20px, 2.4vw, 40px) !important;
    align-items: center !important;

    margin-bottom: clamp(20px, 1.8vw, 28px) !important;
}

body.taxai-journals-modern-header-v2266g7wh49a
.taxai-modern-journal-hero-v2266g7wh49a
h1 {
    margin-top: 4px !important;
    margin-bottom: 8px !important;

    line-height: 1.16 !important;
}

body.taxai-journals-modern-header-v2266g7wh49a
.taxai-modern-journal-hero-v2266g7wh49a
p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;

    line-height: 1.6 !important;
}

body.taxai-journals-modern-header-v2266g7wh49a
.taxai-modern-journal-hero-v2266g7wh49a
> * {
    min-height: 0 !important;
}

body.taxai-journals-modern-header-v2266g7wh49a
.taxai-modern-journal-hero-v2266g7wh49a
a,
body.taxai-journals-modern-header-v2266g7wh49a
.taxai-modern-journal-hero-v2266g7wh49a
button {
    min-height: 44px !important;
}

body.taxai-journals-modern-header-v2266g7wh49a
.taxai-modern-journal-hero-v2266g7wh49a
:is(
    [class*="action"],
    [class*="button"],
    [class*="button"],
    [class*="cta"]
) {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
}

/* Hero直後のKPIとの距離 */
body.taxai-journals-modern-header-v2266g7wh49a
.taxai-modern-journal-hero-v2266g7wh49a
+ * {
    margin-top: 0 !important;
}

/* ============================================================
 * 会計送信
 * ============================================================ */

body.taxai-send-queue-modern-header-v2266g7wh49a
.taxai-modern-send-title-v2266g7wh49a {
    min-height: 0 !important;
    height: auto !important;

    padding:
        clamp(22px, 1.9vw, 32px)
        clamp(24px, 2.5vw, 42px) !important;

    margin-bottom: clamp(16px, 1.4vw, 22px) !important;
}

body.taxai-send-queue-modern-header-v2266g7wh49a
.taxai-modern-send-title-v2266g7wh49a
h1 {
    margin-top: 0 !important;
    margin-bottom: 8px !important;

    line-height: 1.16 !important;
}

body.taxai-send-queue-modern-header-v2266g7wh49a
.taxai-modern-send-title-v2266g7wh49a
p {
    margin-top: 0 !important;
    margin-bottom: 0 !important;

    line-height: 1.6 !important;
}

/*
 * 「運用・詳細」は補助Heroとして残しつつ、
 * 高さと余白を縮小してタイトルカードと一体化させる。
 */
/*
 * 「運用・詳細」はBlade内の静的HTMLではなく、
 * JavaScriptでdetails / summary配下へ生成される。
 * 既存の動的生成クラスを契約として限定的に使用する。
 */
body.taxai-send-queue-modern-header-v2266g7wh49a
summary:has(.taxai-accounting-phase1-advanced-title) {
    min-height: 0 !important;
    height: auto !important;

    padding:
        14px
        clamp(20px, 2vw, 32px) !important;

    gap: 16px !important;
    align-items: center !important;
}

body.taxai-send-queue-modern-header-v2266g7wh49a
details:has(.taxai-accounting-phase1-advanced-title) {
    min-height: 0 !important;
    height: auto !important;

    margin-top: 0 !important;
    margin-bottom: clamp(18px, 1.6vw, 26px) !important;
}

body.taxai-send-queue-modern-header-v2266g7wh49a
.taxai-accounting-phase1-advanced-copy {
    min-width: 0 !important;
}

body.taxai-send-queue-modern-header-v2266g7wh49a
.taxai-accounting-phase1-advanced-title {
    margin-top: 0 !important;
    margin-bottom: 3px !important;

    line-height: 1.35 !important;
}

body.taxai-send-queue-modern-header-v2266g7wh49a
.taxai-accounting-phase1-advanced-description {
    margin-top: 0 !important;
    margin-bottom: 0 !important;

    line-height: 1.5 !important;
}

body.taxai-send-queue-modern-header-v2266g7wh49a
.taxai-accounting-phase1-advanced-control {
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
}

/*
 * タイトルカード直後に動的detailsが配置される場合も、
 * 古い大余白を残さない。
 */
body.taxai-send-queue-modern-header-v2266g7wh49a
.taxai-modern-send-title-v2266g7wh49a
~ details:has(.taxai-accounting-phase1-advanced-title) {
    margin-top: 0 !important;
}

/* ============================================================
 * レスポンシブ
 * ============================================================ */

@media (max-width: 1100px) {
    body.taxai-journals-modern-header-v2266g7wh49a
    .taxai-modern-journal-hero-v2266g7wh49a {
        padding: 24px !important;
        gap: 20px !important;
    }

    body.taxai-send-queue-modern-header-v2266g7wh49a
    .taxai-modern-send-title-v2266g7wh49a {
        padding: 24px !important;
    }
}

@media (max-width: 720px) {
    body.taxai-journals-modern-header-v2266g7wh49a
    .taxai-modern-journal-hero-v2266g7wh49a {
        padding: 20px 18px !important;
        margin-bottom: 18px !important;
    }

    body.taxai-journals-modern-header-v2266g7wh49a
    .taxai-modern-journal-hero-v2266g7wh49a
    :is(
        [class*="action"],
        [class*="button"],
        [class*="cta"]
    ) {
        padding-top: 14px !important;
        padding-bottom: 14px !important;
    }

    body.taxai-send-queue-modern-header-v2266g7wh49a
    .taxai-modern-send-title-v2266g7wh49a {
        padding: 20px 18px !important;
        margin-bottom: 14px !important;
    }

    body.taxai-send-queue-modern-header-v2266g7wh49a
    summary:has(.taxai-accounting-phase1-advanced-title) {
        padding: 14px 16px !important;
    }

    body.taxai-send-queue-modern-header-v2266g7wh49a
    details:has(.taxai-accounting-phase1-advanced-title) {
        margin-bottom: 18px !important;
    }
}
