﻿/* ═══════════════════════════════════════════════════════════════
   WanderingHelp — Modal Styles
   Add to site.css or import as a separate file.
   Uses your existing CSS variable system.
   ═══════════════════════════════════════════════════════════════ */

/* ── Overlay backdrop ───────────────────────────────────────── */
.wh-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 1rem;
}

    .wh-overlay[hidden] {
        display: none;
    }

/* ── Modal card ─────────────────────────────────────────────── */
.wh-modal {
    background: var(--glass-bg, #fff);
    border: 1px solid var(--glass-stroke, #e5e7eb);
    border-radius: 14px;
    width: 100%;
    max-width: 540px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

/* ── Header ─────────────────────────────────────────────────── */
.wh-modal-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem .75rem;
    border-bottom: 1px solid var(--glass-stroke, #e5e7eb);
    gap: .75rem;
}

.wh-modal-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--text-main);
    flex: 1;
}

.wh-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .95rem;
    color: var(--text-muted);
    padding: .25rem .4rem;
    border-radius: 6px;
    line-height: 1;
    transition: background .15s, color .15s;
}

    .wh-close:hover {
        background: var(--glass-stroke, #f3f4f6);
        color: var(--text-main);
    }

/* ── Body ───────────────────────────────────────────────────── */
.wh-modal-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
    font-size: .9rem;
    line-height: 1.65;
    color: var(--text-main);
}

    .wh-modal-body p {
        margin: 0 0 .65rem;
    }

    .wh-modal-body ol,
    .wh-modal-body ul {
        margin: 0 0 .65rem;
        padding-left: 1.4rem;
    }

    .wh-modal-body li {
        margin-bottom: .35rem;
    }

    .wh-modal-body code {
        font-family: monospace;
        font-size: .82rem;
        background: var(--glass-stroke, #f3f4f6);
        padding: .1rem .35rem;
        border-radius: 4px;
    }

/* ── Section blocks ─────────────────────────────────────────── */
.wh-section {
    margin: .75rem 0;
    padding: .65rem .85rem;
    background: var(--glass-bg-2, rgba(0,0,0,.03));
    border-left: 3px solid var(--accent, #6366f1);
    border-radius: 0 8px 8px 0;
}

.wh-section-title {
    font-size: .78rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    margin-bottom: .35rem;
}

.wh-section p:last-child {
    margin-bottom: 0;
}

/* ── Callout ─────────────────────────────────────────────────── */
.wh-callout {
    margin: .75rem 0 .25rem;
    padding: .6rem .85rem;
    background: var(--accent-soft, rgba(99,102,241,.08));
    border: 1px solid var(--accent-muted, rgba(99,102,241,.25));
    border-radius: 8px;
    font-size: .86rem;
    color: var(--text-main);
}

/* ── Inline tags ─────────────────────────────────────────────── */
.wh-tag {
    display: inline-block;
    padding: .1rem .45rem;
    border-radius: 4px;
    font-size: .78rem;
    font-weight: 600;
}

.wh-tag-green {
    background: #dcfce7;
    color: #15803d;
}

.wh-tag-red {
    background: #fee2e2;
    color: #b91c1c;
}

.wh-tag-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

/* ── Footer ─────────────────────────────────────────────────── */
.wh-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1.25rem 1rem;
    border-top: 1px solid var(--glass-stroke, #e5e7eb);
    gap: .75rem;
    flex-wrap: wrap;
}

.wh-dismiss-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .82rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

    .wh-dismiss-label input[type="checkbox"] {
        accent-color: var(--accent, #6366f1);
        width: 14px;
        height: 14px;
        cursor: pointer;
        flex-shrink: 0;
    }

    .wandering-help {
        background: #eee;
        padding: 7px 17px;
        border-radius: 7px;
    }