/*
Theme Name: Directory Minimal
Description: Lightweight, minimal presentation for Local Directory Framework, with a static homepage photo and no theme JavaScript or external fonts.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: directory-minimal
*/

/* Shared tokens; selectors are scoped to this theme's body class. */
:root {
    --dirm-ink: #172b39;
    --dirm-muted: #52636f;
    --dirm-line: #dce3e7;
    --dirm-paper: #fff;
    --dirm-wash: #f7f9fa;
    --dirm-accent: #155e75;
    --nwmd-page-shell-max-width: 1120px;
}
html { background: #fff; }
body.dirm-minimal {
    min-width: 0;
    margin: 0;
    background: var(--dirm-paper);
    color: var(--dirm-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}
.dirm-minimal *, .dirm-minimal *::before, .dirm-minimal *::after { box-sizing: border-box; }
.dirm-minimal img { max-width: 100%; height: auto; }
.dirm-minimal a { text-underline-offset: .18em; }
.dirm-minimal :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 3px solid var(--dirm-accent) !important;
    outline-offset: 4px;
}
.dirm-shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.dirm-skip-link { position: fixed; z-index: 99999; left: 16px; top: 12px; padding: 12px 18px; background: var(--dirm-ink); color: #fff; transform: translateY(-180%); }
.dirm-skip-link:focus { transform: none; }
.dirm-site-header { border-bottom: 1px solid var(--dirm-line); }
.dirm-site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.dirm-site-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; }
.dirm-site-brand, .dirm-site-back { color: var(--dirm-ink); text-decoration: none; }
.dirm-site-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--dirm-ink); color: #fff; font-size: 12px; }
.dirm-main { min-height: 60vh; padding-block: 48px; }
.dirm-content { max-width: 800px; margin: 0 auto 32px; padding-block: 12px 28px; border-bottom: 1px solid var(--dirm-line); overflow-wrap: anywhere; }
.dirm-page-title, .dirm-entry-title { margin: 0 0 20px; color: var(--dirm-ink); font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; letter-spacing: -.03em; }
.dirm-entry-title a { color: inherit; text-decoration: none; }
.dirm-entry-content { max-width: 800px; margin-inline: auto; overflow-wrap: anywhere; }
.dirm-entry-content a { color: var(--dirm-accent); }
.dirm-entry-content iframe, .dirm-entry-content video { max-width: 100%; }
.dirm-entry-content pre { max-width: 100%; overflow-x: auto; }
.dirm-entry-content table { display: block; max-width: 100%; overflow-x: auto; }
.dirm-site-footer { padding-block: 24px; border-top: 1px solid var(--dirm-line); color: var(--dirm-muted); font-size: .875rem; }
.dirm-welcome { max-width: 800px; padding-block: 40px 56px; margin-inline: auto; }
.dirm-welcome h1 { max-width: 14ch; margin: 12px 0 20px; font-size: clamp(2.4rem, 6vw, 4.4rem); letter-spacing: -.055em; line-height: 1.1; }
.dirm-welcome p { color: var(--dirm-muted); }
.dirm-eyebrow { font-size: .875rem; font-weight: 700; }
.dirm-button { display: inline-block; padding: 12px 18px; border-radius: 8px; background: var(--dirm-accent); color: #fff; text-decoration: none; }

/* LDF retains all markup, routes, data queries, forms and navigation handlers. */
.dirm-minimal .nwmd-app-home__panel { padding-top: 24px; }
.dirm-minimal .nwmd-app-home__panel--landing {
    width: min(1120px, calc(100% - 40px));
    min-height: auto;
    overflow: visible;
    padding: 24px 0 40px;
}
.dirm-minimal .nwmd-app-topbar--landing {
    position: relative; top: auto; right: auto; left: auto;
    width: 100%; margin: 0 0 24px; min-height: 44px;
}
.dirm-minimal .nwmd-app-topbar--landing .nwmd-app-brand {
    color: var(--dirm-ink); text-shadow: none;
}
.dirm-minimal :is(.nwmd-app-brand__mark, .nwmd-app-bar__mark, .nwmd-profile-bar__mark) {
    background: var(--dirm-ink); color: #fff; border: 0; border-radius: 8px; box-shadow: none;
}
.dirm-minimal .nwmd-home-landing {
    display: flex; flex-direction: column; align-items: center; gap: 32px;
    min-height: 0; padding: 30px 0 0; background: transparent;
}
.dirm-minimal .nwmd-home-landing::before { content: none; }
.dirm-minimal .nwmd-home-landing__content {
    order: 1; width: min(100%, 680px); color: var(--dirm-ink);
}
.dirm-minimal .nwmd-home-landing__copy { width: 100%; }
.dirm-minimal .nwmd-home-landing__copy h1 {
    color: var(--dirm-ink); font-size: clamp(1.7rem, 7cqw, 3rem); font-weight: 750;
    white-space: normal; line-height: 1.16; letter-spacing: -.045em; text-shadow: none;
}
.dirm-minimal .nwmd-home-landing__intro {
    display: block; margin-top: 16px; color: var(--dirm-muted);
    font-size: clamp(.875rem, 3.2cqw, 1.125rem); line-height: 1.65; text-shadow: none;
}
.dirm-minimal :is(.nwmd-home-landing__title-line, .nwmd-home-landing__intro-line) {
    display: block; width: auto; max-width: 100%; white-space: normal;
}
.dirm-minimal .nwmd-state-selector { width: 100%; margin-top: 28px; }
.dirm-minimal .nwmd-state-list { gap: 12px; }
.dirm-minimal .nwmd-state-button {
    min-height: 68px; gap: 12px; padding: 16px 18px;
    border: 1px solid var(--dirm-line); border-radius: 10px;
    background: var(--dirm-wash); color: var(--dirm-ink); box-shadow: none; transition: background-color 120ms ease;
}
.dirm-minimal .nwmd-state-button:hover { transform: none; background: #eaf0f3; border-color: #aabdc8; box-shadow: none; }
.dirm-minimal .nwmd-state-button__label { flex-wrap: wrap; gap: 2px 8px; }
.dirm-minimal .nwmd-state-button__label strong { font-weight: 700; }
.dirm-minimal :is(.nwmd-state-button__pin, .nwmd-state-button__label > span) { color: var(--dirm-accent); }
/* The first LDF image remains visible; other images have no src and no slideshow script. */
.dirm-minimal .nwmd-home-hero__slides {
    position: relative; inset: auto; order: 2; width: 100%; aspect-ratio: 4 / 1;
    max-height: 220px; overflow: hidden; border-radius: 12px; background: var(--dirm-wash);
}
.dirm-minimal .nwmd-home-hero__slide { height: 100%; object-fit: cover; transition: none; }
.dirm-minimal .nwmd-home-hero__slide:not(:first-child) { display: none; }
.dirm-minimal .nwmd-home-hero__slide:first-child { opacity: 1; }

/* Compact footer actions, while retaining native hidden states and dialogs. */
.dirm-minimal .nwmd-home-landing__content .nwmd-site-footer {
    width: 100%; margin-top: 28px; padding-top: 22px; border-top-color: var(--dirm-line); gap: 12px;
}
.dirm-minimal .nwmd-site-footer__meta { color: var(--dirm-muted); }
.dirm-minimal .nwmd-home-landing__content :is(.nwmd-site-footer__manage, .nwmd-site-footer__install) {
    min-height: 48px; height: auto; padding: 12px 16px; border-radius: 8px;
    font-size: .925rem; box-shadow: none;
}
.dirm-minimal .nwmd-home-landing__content .nwmd-site-footer__manage {
    border-color: var(--dirm-line); background: #fff; color: var(--dirm-ink);
}
.dirm-minimal .nwmd-home-landing__content .nwmd-site-footer__manage::before { content: none; }
.dirm-minimal .nwmd-home-landing__content .nwmd-site-footer__manage:hover { background: var(--dirm-wash); }
.dirm-minimal .nwmd-home-landing__content .nwmd-site-footer__install {
    border-color: var(--dirm-accent); background: var(--dirm-accent); color: #fff;
}
.dirm-minimal .nwmd-home-landing__content .nwmd-site-footer__links button { color: var(--dirm-muted); text-decoration-color: currentColor; }
.dirm-minimal .nwmd-home-landing__content .nwmd-site-footer__links button:hover { color: var(--dirm-ink); }

/* Calm cards and consistent spacing on chooser, list and profile screens. */
.dirm-minimal :is(.nwmd-choice-button, .nwmd-city-button, .nwmd-app-button, .nwmd-category-button, .nwmd-specialty-button) {
    border-radius: 10px; box-shadow: none;
}
.dirm-minimal :is(.nwmd-app-topbar, .nwmd-app-bar, .nwmd-profile-bar) { margin-bottom: 28px; }
.dirm-minimal :is(.nwmd-step-heading h1, .nwmd-app-heading h1, .nwmd-profile-heading h1) {
    font-weight: 750; letter-spacing: -.035em; line-height: 1.15;
}
.dirm-minimal .nwmd-info-dialog { border-radius: 12px; }
.dirm-minimal .nwmd-info-dialog::backdrop { backdrop-filter: none; }
@media (max-width: 600px) {
    .dirm-shell, .dirm-minimal .nwmd-app-home__panel--landing { width: calc(100% - 32px); }
    .dirm-main { padding-block: 30px; }
    .dirm-site-header__inner { min-height: 64px; }
    .dirm-minimal .nwmd-home-landing { padding-top: 18px; gap: 24px; }
    .dirm-minimal .nwmd-state-list { grid-template-columns: 1fr; }
    .dirm-minimal .nwmd-home-hero__slides { aspect-ratio: 2.5 / 1; }
    .dirm-minimal .nwmd-home-landing__content .nwmd-site-footer__install { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .dirm-minimal :is(.nwmd-state-button, .nwmd-home-hero__slide) { transition: none; }
}

.dirm-minimal.nwmd-app-body--landing .nwmd-app-home { background: var(--dirm-paper); }
.dirm-minimal .nwmd-choice-button:hover { transform: none; box-shadow: none; }
