/* static/css/loan_guide.css */
/* ガイドページ用: 本体(multi_simulator.css)と同じ見た目の言語を使い、
   実際の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 {
    width: 90%;
    max-width: 64rem;
    margin: 0 auto;
    padding: 0.75rem 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guide-page .page-header {
    margin-top: 1rem;
}

.guide-page .page-header h1 {
    margin: 0 0 0.5rem;
    font-size: 2.25rem;
    line-height: 1.3;
    color: #111827;
}

.guide-page .page-header p {
    margin: 0;
    color: #1f2a44;
    line-height: 1.7;
    font-size: 1rem;
}

.guide-page .card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    color: #222222;
}

.guide-page .card > p {
    margin: 0 0 0.5rem;
    color: #4b5563;
    line-height: 1.7;
    font-size: 0.95rem;
}

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

.guide-cta a {
    color: #2f6ae6;
    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: #1f2a44;
    font-weight: 700;
    text-align: center;
    min-height: 1.3em;
}

.step-demo-viewport {
    overflow: hidden;
    border-radius: 1rem;
    border: 0.0625rem solid #dbe4f0;
    background: #f6f8fb;
    box-shadow: 0 0.125rem 0.5rem rgba(15, 23, 42, 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 #c3d0e6;
    border-radius: 50%;
    background: #ffffff;
    color: #4b5563;
    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: #eef4ff;
    border-color: #2f6ae6;
    color: #2f6ae6;
}

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

/* ====== モック内は非操作。実UIをそのまま埋め込むが押せない見た目にする ====== */

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

.guide-mock input,
.guide-mock select,
.guide-mock textarea {
    cursor: default;
}

.guide-mock .card {
    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.75rem;
    box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.35);
    animation: guide-highlight-pulse 1.8s ease-in-out infinite;
}

@keyframes guide-highlight-pulse {
    0%, 100% { box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.35); }
    50% { box-shadow: 0 0 0 0.375rem rgba(47, 106, 230, 0.18); }
}

.guide-disabled {
    opacity: 0.45;
}

/* ====== ミニチャートのモックアップ ====== */

.guide-chart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 40rem) {
    .guide-chart-grid {
        grid-template-columns: 1fr;
    }
}

.guide-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.3rem;
    height: 6rem;
    padding: 0 0.25rem;
}

.guide-bar-stack {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column-reverse;
    height: 100%;
    border-radius: 0.15rem 0.15rem 0 0;
    overflow: hidden;
}

.guide-bar-principal {
    background: #2f6ae6;
}

.guide-bar-interest {
    background: #ff9f43;
}

.guide-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #4b5563;
}

.guide-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.guide-legend i {
    display: inline-block;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 0.15rem;
}

.guide-legend i.principal { background: #2f6ae6; }
.guide-legend i.interest { background: #ff9f43; }

.guide-line-chart {
    display: block;
    width: 100%;
    height: auto;
}

/* ====== 表のモックアップ ====== */

.guide-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    background: #ffffff;
}

.guide-mini-table th,
.guide-mini-table td {
    border: 0.0625rem solid #d1d5db;
    padding: 0.4rem 0.5rem;
    text-align: center;
}

.guide-mini-table th {
    background: #f2f2f2;
    font-weight: 700;
    color: #222222;
}

.guide-mini-table td {
    color: #1f2937;
}

@media (max-width: 40rem) {
    .guide-page {
        width: auto;
        padding: 0.625rem 0.75rem 1.5rem;
    }

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

    .card {
        padding: 0.75rem;
        border-radius: 1rem;
    }
}
