/* ---------------------------------------------------------------- download page */

.download-page {
    --dl-ink: #14161a;
    --dl-soft: #5b6472;
    --dl-line: #e6e8ec;
    --dl-bg: #f7f8fa;
    --dl-card: #ffffff;
    --dl-brand: #e63946;
    --dl-brand-dark: #c1121f;
    --dl-brand-soft: #fff1f2;
    --dl-ok: #12805c;
    --dl-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
}

.download-page {
    min-height: 100vh;
    background:
        radial-gradient(900px 460px at 6% -12%, #ffe4e6 0%, rgba(255, 228, 230, 0) 60%),
        var(--dl-bg);
    color: var(--dl-ink);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.download-page * { box-sizing: border-box; }
.download-page button,
.download-page input { font: inherit; color: inherit; }

/* ---------------------------------------------------------------- header */

.dl-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--dl-line);
}

.dl-brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }

.dl-brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--dl-brand);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.dl-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.dl-brand-text strong { font-size: 16px; }
.dl-brand-text span { font-size: 11px; color: var(--dl-soft); letter-spacing: .6px; text-transform: uppercase; }

.dl-nav { display: flex; gap: 6px; margin-left: auto; }

.dl-nav a {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--dl-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s, color .15s;
}

.dl-nav a:hover { background: var(--dl-bg); color: var(--dl-ink); }
.dl-nav a.active { background: var(--dl-brand-soft); color: var(--dl-brand-dark); }

/* ---------------------------------------------------------------- hero */

.dl-main { max-width: 1080px; margin: 0 auto; padding: 0 24px 70px; }

.dl-hero { padding: 60px 0 30px; max-width: 640px; }

.dl-eyebrow {
    display: inline-block;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--dl-brand-soft);
    color: var(--dl-brand-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.dl-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.08;
    letter-spacing: -1.5px;
    font-weight: 800;
}

.dl-hero h1 span {
    background: linear-gradient(100deg, var(--dl-brand), #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.dl-hero p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--dl-soft); }

/* ---------------------------------------------------------------- search */

.dl-search { margin: 26px 0 40px; }

.dl-search label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 650; color: var(--dl-soft); }

.dl-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 4px 16px;
    background: var(--dl-card);
    border: 1px solid var(--dl-line);
    border-radius: 14px;
    box-shadow: var(--dl-shadow);
    transition: border-color .15s, box-shadow .15s;
}

.dl-search-box:focus-within { border-color: var(--dl-brand); box-shadow: 0 0 0 4px var(--dl-brand-soft); }
.dl-search-box svg { color: var(--dl-soft); flex: none; }

.dl-search-box input {
    flex: 1;
    min-width: 0;
    padding: 12px 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 15px;
}

.dl-search-box input::-webkit-search-cancel-button { display: none; }

.dl-search-box button {
    padding: 8px 14px;
    border: 0;
    border-radius: 10px;
    background: var(--dl-bg);
    color: var(--dl-soft);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.dl-search-box button:hover { background: var(--dl-line); color: var(--dl-ink); }

.dl-search-hint { margin: 9px 2px 0; font-size: 12.5px; color: var(--dl-soft); }

/* The hint doubles as a row of one-click search shortcuts. */
.dl-search-hint button {
    margin-left: 6px;
    padding: 2px 9px;
    border: 1px solid var(--dl-line);
    border-radius: 999px;
    background: var(--dl-card);
    color: var(--dl-brand);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.dl-search-hint button:hover {
    border-color: var(--dl-brand);
    background: var(--dl-brand-soft);
}

/* ---------------------------------------------------------------- results */

.dl-results-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.dl-results-head h2 { margin: 0; font-size: 20px; letter-spacing: -.5px; }

.dl-count {
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--dl-brand-soft);
    color: var(--dl-brand-dark);
    font-size: 12px;
    font-weight: 700;
}

.dl-list { display: grid; gap: 14px; }

.dl-card {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 20px;
    background: var(--dl-card);
    border: 1px solid var(--dl-line);
    border-radius: 16px;
    box-shadow: var(--dl-shadow);
}

.dl-card-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 17px;
    font-size: 28px;
    background: var(--dl-brand-soft);
}

.dl-card[data-role="rider"] .dl-card-icon { background: #fff4e5; }
.dl-card[data-role="shop"] .dl-card-icon { background: #e8f5ee; }
.dl-card[data-role="admin"] .dl-card-icon { background: #eef2ff; }

.dl-card-body { min-width: 0; }
.dl-card-body h3 { margin: 0 0 4px; font-size: 17px; letter-spacing: -.3px; }
.dl-card-body p { margin: 0 0 9px; font-size: 13.5px; line-height: 1.6; color: var(--dl-soft); }

.dl-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.dl-tag {
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--dl-bg);
    color: var(--dl-soft);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
}

.dl-tag.role { background: var(--dl-brand-soft); color: var(--dl-brand-dark); }
.dl-tag.ok { background: #ecfdf5; color: var(--dl-ok); }

.dl-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 11px;
    background: var(--dl-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, box-shadow .15s;
}

.dl-download:hover { background: var(--dl-brand-dark); box-shadow: 0 8px 20px rgba(230, 57, 70, .25); }

.dl-size { display: block; margin-top: 5px; font-size: 11.5px; color: var(--dl-soft); text-align: right; }

.dl-empty {
    padding: 54px 20px;
    text-align: center;
    background: var(--dl-card);
    border: 1px dashed var(--dl-line);
    border-radius: 16px;
}

.dl-empty strong { display: block; margin-bottom: 5px; font-size: 16px; }
.dl-empty p { margin: 0; color: var(--dl-soft); font-size: 14px; }

/* ---------------------------------------------------------------- area */

/* The service area panel: a short explanation next to the map. */
.dl-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 28px;
    align-items: center;
    margin-top: 52px;
    padding: 26px;
    background: var(--dl-card);
    border: 1px solid var(--dl-line);
    border-radius: 20px;
    box-shadow: var(--dl-shadow);
}

.dl-area-text h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.5px; }
.dl-area-text p { margin: 0 0 16px; font-size: 14px; line-height: 1.65; color: var(--dl-soft); }

.dl-area-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.dl-area-facts li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 11px 14px;
    background: var(--dl-bg);
    border: 1px solid var(--dl-line);
    border-radius: 12px;
}

.dl-area-facts strong { font-size: 14.5px; }
.dl-area-facts span { font-size: 12.5px; color: var(--dl-soft); }

/* The map container is sized here so the Leaflet stylesheet, which is
   shared with every other page, never has to know about this page. */
.dl-map {
    position: relative;
    width: 100%;
    height: 320px;
    min-height: 220px;
    max-height: 420px;
    border-radius: 14px;
    border: 1px solid var(--dl-line);
    background: #f1f3f6;
    overflow: hidden;
}

.dl-map-fallback {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 220px;
    padding: 20px;
    text-align: center;
    color: var(--dl-soft);
    font-size: 13.5px;
    line-height: 1.6;
    background: repeating-linear-gradient(45deg, #f6f7f9, #f6f7f9 10px, #f1f3f6 10px, #f1f3f6 20px);
}

.dl-area-caption {
    margin: 10px 0 0;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--dl-soft);
}

/* ---------------------------------------------------------------- help */

.dl-help { margin-top: 56px; }
.dl-help h2 { margin: 0 0 18px; font-size: 20px; letter-spacing: -.5px; }

.dl-help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }

.dl-help-grid article {
    padding: 20px;
    background: var(--dl-card);
    border: 1px solid var(--dl-line);
    border-radius: 15px;
}

.dl-help-grid h3 { margin: 0 0 7px; font-size: 15px; }
.dl-help-grid p { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--dl-soft); }

/* ---------------------------------------------------------------- footer */

.dl-footer {
    padding: 28px 24px 44px;
    text-align: center;
    border-top: 1px solid var(--dl-line);
    background: var(--dl-card);
}

.dl-footer p { margin: 0 0 6px; font-size: 13px; color: var(--dl-soft); }
.dl-footer a { color: var(--dl-brand-dark); text-decoration: none; font-weight: 600; }
.dl-footer a:hover { text-decoration: underline; }

@media (max-width: 720px) {
    .dl-header { padding: 12px 16px; flex-wrap: wrap; }
    .dl-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
    .dl-main { padding: 0 16px 50px; }
    .dl-card { grid-template-columns: 50px minmax(0, 1fr); }
    .dl-card-icon { width: 50px; height: 50px; font-size: 23px; }
    .dl-download { grid-column: 1 / -1; justify-content: center; }
    .dl-size { text-align: center; }
    .dl-area { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; padding: 20px; }
    .dl-map { height: 260px; }
}
