/* My drive (js/mydrive.js): a pill on the map, a sheet with the drive, pins on the map. Uses the map's own tokens. */
.md-pill { position: fixed; z-index: 7; top: calc(env(safe-area-inset-top, 0px) + 16px); left: 424px; display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer; color: var(--white); background: var(--navy);
    font: 600 14px/1 var(--body); box-shadow: 0 4px 16px rgba(19, 41, 75, .28); }
.md-pill b { min-width: 22px; padding: 3px 6px; border-radius: 999px; color: var(--navy); background: var(--blue); font-size: 12px; text-align: center; }
.md-car { width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 11l1.5-4.5A2 2 0 0 1 8.4 5h7.2a2 2 0 0 1 1.9 1.5L19 11h1v6h-2v2h-2v-2H8v2H6v-2H4v-6h1zm2.1 0h9.8l-1-3H8.1l-1 3zM7 15a1.2 1.2 0 1 0 0-2.4A1.2 1.2 0 0 0 7 15zm10 0a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 11l1.5-4.5A2 2 0 0 1 8.4 5h7.2a2 2 0 0 1 1.9 1.5L19 11h1v6h-2v2h-2v-2H8v2H6v-2H4v-6h1zm2.1 0h9.8l-1-3H8.1l-1 3zM7 15a1.2 1.2 0 1 0 0-2.4A1.2 1.2 0 0 0 7 15zm10 0a1.2 1.2 0 1 0 0-2.4 1.2 1.2 0 0 0 0 2.4z'/%3E%3C/svg%3E") center/contain no-repeat; }

.md-sheet { position: fixed; z-index: 8; top: calc(env(safe-area-inset-top, 0px) + 16px); right: 56px; bottom: 16px; width: 380px; overflow-y: auto;
    padding: 16px 18px 20px; border-radius: 8px; color: var(--white); background: var(--navy); box-shadow: 0 12px 40px rgba(0, 0, 0, .3); }
.md-sheet[hidden] { display: none; }
.md-sheet h3 { margin: 18px 0 8px; color: var(--soft); font: 600 12px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.md-head { display: flex; gap: 8px; align-items: center; }
.md-name { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 4px; color: var(--white); background: var(--deep);
    font: 600 20px/1.2 var(--display); letter-spacing: .02em; }
.md-name::placeholder { color: var(--faint); }
.md-x { width: 40px; height: 40px; border: 0; border-radius: 4px; cursor: pointer; background: var(--raise); font-size: 22px; line-height: 1; }
.md-empty, .md-note { color: var(--soft); line-height: 1.55; }
.md-note { margin: 8px 0 0; font-size: 12px; color: var(--faint); }
.md-sum { margin: 12px 0 6px; color: var(--blue); font-weight: 600; }
.md-list { margin: 0; padding: 0; list-style: none; }
.md-stop { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; }
.md-n, .md-pin { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--navy); background: var(--blue); font: 700 13px/1 var(--body); }
.md-t b { display: block; font-weight: 600; line-height: 1.3; }
.md-t small { color: var(--soft); font-size: 12px; }
.md-ctl { display: flex; gap: 2px; }
.md-ctl button { width: 34px; height: 34px; border: 0; border-radius: 4px; cursor: pointer; background: var(--raise); font-size: 15px; }
.md-ctl button:disabled { opacity: .3; cursor: default; }
.md-leg { margin-left: 13px; padding: 2px 0 2px 25px; border-left: 2px dashed var(--rule); color: var(--faint); font-size: 12px; }
.md-near button { display: flex; justify-content: space-between; gap: 10px; width: 100%; margin: 0 0 6px; padding: 10px 12px; border: 1px dashed var(--rule);
    border-radius: 4px; cursor: pointer; background: transparent; text-align: left; font-weight: 500; }
.md-near small { color: var(--faint); white-space: nowrap; }
.md-acts, .md-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.md-acts > *, .md-row > * { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 0; border-radius: 4px; cursor: pointer;
    color: var(--white); background: var(--tint); font: 600 13px/1 var(--body); text-decoration: none; }
.md-acts a:first-of-type, .md-row > :first-child { color: var(--navy); background: var(--blue); }
.md-qr { display: flex; gap: 14px; align-items: center; margin-top: 14px; padding: 12px; border-radius: 6px; background: var(--white); color: var(--navy); }
.md-qr svg { width: 112px; height: 112px; flex: none; }
.md-qr p { margin: 0; font-size: 13px; line-height: 1.45; }
.md-status { display: block; min-height: 18px; margin-top: 6px; color: var(--blue); font-size: 13px; }
.md-saved ul { margin: 0; padding: 0; list-style: none; }
.md-saved li { display: flex; gap: 6px; margin-bottom: 6px; }
.md-saved li > button:first-child { flex: 1; display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 12px; border: 0;
    border-radius: 4px; cursor: pointer; background: var(--raise); text-align: left; }
.md-saved small { color: var(--faint); }
.md-del { width: 44px; border: 0; border-radius: 4px; cursor: pointer; background: var(--raise); font-size: 18px; }
.md-pin { border: 2px solid var(--white); cursor: pointer; box-shadow: 0 2px 8px rgba(19, 41, 75, .35); background: var(--navy); color: var(--white); }
.plaque .acts .md-add { padding: 8px 10px; border: 0; border-radius: 2px; cursor: pointer; color: var(--navy); background: var(--blue); font: 700 12.5px/1 var(--body); }
.plaque .acts .md-add.on { color: var(--white); background: color-mix(in srgb, var(--blue) 35%, var(--navy)); }

@media (max-width: 759px) {
    .md-pill { left: 12px; top: calc(env(safe-area-inset-top, 0px) + 12px); }
    .plaque:not([hidden]) ~ .md-pill { display: none; }   /* an open sign has its own Add button; the pill would cover its title */
    .md-sheet { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 82vh; border-radius: 12px 12px 0 0;
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); }
}
