/* The Dungeon Generator's Export window (dungeon_export_dialog.js) and the page while Walk mode lasts
   (dungeon_walk_mount.js; the walk's own bar, fog and pad are dungeon_walk/walk.css). */

/* --- The Export window: the page's modal (char-campaign-modal), its choices in one column ------------------------- */

.dexp-modal .modal-body {
    padding-top: 12px;
}

/* The window fits the screen: the site's windows start 15vh down (styles9.css .modal-content), which pushed this
   tall one's buttons off a 900 px screen. Bootstrap's scrollable dialog caps its height to the viewport, so the body
   scrolls inside and the header and the buttons stay in view. */
.dexp-modal .modal-content {
    margin-top: 0;
}

.dexp-modal .modal-footer {
    flex-shrink: 0;
}

.dexp-lead {
    margin: 0 0 12px;
    color: #b6cbd0;
}

.dexp-formats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.dexp-format {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(231, 191, 143, 0.35);
    border-radius: 10px;
    cursor: pointer;
}

.dexp-format span {
    color: #b6cbd0;
    font-size: 0.8rem;
}

.dexp-format.is-chosen {
    border-color: #e7bf8f;
    background: rgba(231, 191, 143, 0.12);
}

.dexp-format-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dexp-format:focus-within {
    outline: 2px solid var(--dungeon-link);
    outline-offset: 2px;
}

.dexp-field {
    margin-bottom: 12px;
}

.dexp-field[hidden] {
    display: none;
}

.dexp-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.dexp-label select {
    margin-top: 4px;
    font-weight: 400;
}

.dexp-hint {
    margin: 2px 0 0;
    color: #b6cbd0;
    font-size: 0.8rem;
}

.dexp-hint[hidden] {
    display: none;
}

.dexp-field--toggle {
    padding-left: 1.9em;
    min-height: 32px;
}

.dexp-floors {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
}

.dexp-floor {
    margin: 0;
}

.dexp-notes p {
    margin: 4px 0;
    color: var(--dungeon-link);
}

.dexp-error {
    flex: 1 0 100%;
    margin: 0 0 4px;
    padding: 8px 10px;
    border: 1px solid #d85f5f;
    border-radius: 8px;
    color: #f0a0a0;
}

.dexp-error[hidden] {
    display: none;
}

@media (max-width: 575.98px) {
    /* A phone: the window is the whole screen, whatever the page's own spacing above modals is. */
    .dexp-modal .modal-dialog {
        position: fixed;
        inset: 0;
    }

    /* The site's windows start 15vh down (styles9.css .modal-content); this one starts at the top. */
    .dexp-modal .modal-content {
        margin-top: 0;
        border-radius: 0;
    }

    .dexp-modal .modal-footer {
        position: sticky;
        bottom: 0;
        background: inherit;
    }

    .dexp-modal .modal-footer .btn {
        flex: 1 1 0;
        min-height: 48px;
    }
}

/* --- The page while the walk lasts: the map has the room --------------------------------------------------------- */

.dungeon-walk-slot {
    flex: 0 0 auto;
    padding: 6px 6px 0;
}

.dungeon-walk-slot[hidden] {
    display: none;
}

.dungeon-page.is-walking .dungeon-rail,
.dungeon-page.is-walking .dungeon-flyout,
.dungeon-page.is-walking .dungeon-phonebar,
.dungeon-page.is-walking .dungeon-side,
.dungeon-page.is-walking .dungeon-statusbar,
.dungeon-page.is-walking .dungeon-chip,
.dungeon-page.is-walking .dungeon-peek,
.dungeon-page.is-walking #dungeon-undo-btn,
.dungeon-page.is-walking #dungeon-redo-btn {
    display: none !important;
}

/* The floors follow the stairs of the walk; they are not to be picked while it lasts. */
.dungeon-page.is-walking .dungeon-floor-tabs {
    pointer-events: none;
    opacity: 0.7;
}

/* On a phone the toolbar floats over the map: the walk's bar is the top of the screen, so the toolbar gives way. */
.dungeon-page[data-layout="phone"].is-walking .dungeon-map-toolbar {
    display: none;
}
