/* static/css/subsidy_guide.css */
/* ガイドページ用: 本体(subsidy_simulation.css)と同じ見た目の言語（白いコンテナ、
   salary-table、青文字の結果表示）を使い、実際のUIをHTMLで再現したスライドで解説する */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background: #f6f8fb;
    color: #111827;
    font-family: 'M PLUS 1p', sans-serif;
}

.guide-page {
    max-width: 64rem;
    width: 90%;
    margin: 1.5rem auto 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 0.8rem;
    box-shadow: 0 0.2rem 0.4rem rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.guide-page h1 {
    margin: 0 0 0.75rem;
    font-size: 1.75rem;
    text-align: center;
}

.guide-page > p {
    margin: 0 0 1rem;
    line-height: 1.8;
}

.guide-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 0.0625rem solid #e5e7eb;
}

.guide-section h2 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.guide-section > p {
    margin: 0 0 0.5rem;
    line-height: 1.8;
}

.guide-cta {
    text-align: center;
    color: #444;
}

.guide-cta a {
    color: #1500ff;
    font-weight: 700;
}

/* ====== ステップデモスライダー（実UIをHTMLで再現） ====== */

.step-demo-slider {
    width: 100%;
    margin: 1rem auto 0.25rem;
    user-select: none;
}

.step-demo-caption {
    margin: 0 0 0.6rem;
    font-size: 0.95rem;
    color: #333;
    font-weight: 700;
    text-align: center;
    min-height: 1.3em;
}

.step-demo-viewport {
    overflow: hidden;
    border-radius: 0.6rem;
    border: 0.0625rem solid #ccc;
    background: #fafafa;
    box-shadow: 0 0.125rem 0.4rem rgba(0, 0, 0, 0.08);
    transition: height 0.3s ease-in-out;
}

.step-demo-track {
    display: flex;
    align-items: flex-start;
    transition: transform 0.45s ease-in-out;
}

.step-demo-frame {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

.step-demo-footer {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
}

.step-demo-navs {
    display: flex;
    gap: 0.5rem;
}

.step-demo-nav {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0.0625rem solid #ccc;
    border-radius: 50%;
    background: #ffffff;
    color: #555;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.step-demo-nav:hover {
    background: #eef0ff;
    border-color: #1500ff;
    color: #1500ff;
}

.step-demo-nav.is-active {
    background: #1500ff;
    border-color: #1500ff;
    color: #ffffff;
}

/* ====== モック内は非操作 ====== */

.guide-mock {
    pointer-events: none;
}

.guide-mock input {
    cursor: default;
}

.guide-mock .input-section {
    margin: 0;
}

/* ====== 吹き出し／強調用のヘルパー ====== */

.guide-callout {
    position: absolute;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 2rem;
    background: #dc2626;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.25);
    animation: guide-callout-bounce 1.8s ease-in-out infinite;
}

.guide-callout::after {
    content: "";
    position: absolute;
    left: 1.4rem;
    bottom: -0.5rem;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0.6rem 0.5rem 0 0;
    border-color: #dc2626 transparent transparent transparent;
}

@keyframes guide-callout-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-0.25rem); }
}

@media (prefers-reduced-motion: reduce) {
    .guide-callout { animation: none; }
}

.guide-highlight {
    position: relative;
    border-radius: 0.4rem;
    box-shadow: 0 0 0 0.1875rem rgba(21, 0, 255, 0.3);
    animation: guide-highlight-pulse 1.8s ease-in-out infinite;
}

@keyframes guide-highlight-pulse {
    0%, 100% { box-shadow: 0 0 0 0.1875rem rgba(21, 0, 255, 0.3); }
    50% { box-shadow: 0 0 0 0.375rem rgba(21, 0, 255, 0.15); }
}

.guide-disabled {
    opacity: 0.45;
}

@media only screen and (max-width: 37.5rem) {
    .guide-page {
        width: auto;
        margin: 1rem 0.75rem 1.5rem;
        padding: 1rem;
    }

    .guide-page h1 {
        font-size: 1.4rem;
    }
}
