/* Shared styles for the public site map page (body.smp-public) and the
   placement tool (body.smp-tool). Both are standalone pages. */
:root {
    --smp-open: #2e9e5b;
    --smp-booked: #d1433b;
    --smp-ink: #1f2a24;
    --smp-muted: #5f6d66;
    --smp-line: #cfd8d2;
}
* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    margin: 0;
    font:
        14px/1.4 system-ui,
        "Segoe UI",
        Roboto,
        sans-serif;
    color: var(--smp-ink);
    background: #fff;
}
header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    padding: 8px 44px 8px 12px;
    background: #fff;
    border-bottom: 1px solid #e3e8e4;
}
header b {
    font-size: 15px;
}
header .dates {
    color: var(--smp-muted);
}
.legend {
    display: flex;
    gap: 14px;
    color: var(--smp-muted);
    font-size: 13px;
    margin-left: auto;
}
.legend i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: -1px;
}
.legend .sw-open {
    background: var(--smp-open);
}
.legend .sw-booked {
    background: var(--smp-booked);
}
.empty {
    padding: 40px;
    text-align: center;
    color: var(--smp-muted);
}

/* Markers (shared) */
#wrap {
    position: relative;
    user-select: none;
}
#overlay {
    position: absolute;
    inset: 0;
}
.mk {
    position: absolute;
    transform: translate(-50%, -50%);
    text-decoration: none;
    color: inherit;
}
.mk .ic {
    position: relative;
    width: 100%;
}
.mk .ic img {
    width: 100%;
    display: block;
    pointer-events: none;
}
.mk .badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    color: #fff;
    border: 1px solid #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    line-height: 1;
}
.mk .badge.solo {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin: 0 auto;
}
.mk.open .badge {
    background: var(--smp-open);
}
.mk.booked .badge {
    background: var(--smp-booked);
}
.mk.booked {
    cursor: not-allowed;
}
#tip {
    position: absolute;
    pointer-events: none;
    background: var(--smp-ink);
    color: #fff;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 12px;
    display: none;
    white-space: nowrap;
    z-index: 5;
}

/* Public page: the image fills the available height and never scrolls */
body.smp-public {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
body.smp-public #stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f5f3;
}
body.smp-public #wrap {
    display: inline-block;
    line-height: 0;
}
body.smp-public #wrap img.base {
    display: block;
    height: calc(100vh - 44px);
    max-width: 100vw;
    width: auto;
    object-fit: contain;
}
body.smp-public .mk.open:hover .badge {
    outline: 3px solid #ffb400;
}

/* Placement tool */
body.smp-tool {
    font-size: 15px;
    line-height: 1.45;
    background: #f3f5f3;
}
body.smp-tool header,
body.smp-tool #tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid var(--smp-line);
}
body.smp-tool header h1 {
    font-size: 17px;
    margin: 0 14px 0 0;
    font-weight: 600;
}
.seg {
    display: inline-flex;
    border: 1px solid var(--smp-line);
    border-radius: 6px;
    overflow: hidden;
}
.seg button {
    border: 0;
    background: #fff;
    padding: 7px 12px;
    cursor: pointer;
    font: inherit;
    color: var(--smp-muted);
}
.seg button.on {
    background: var(--smp-ink);
    color: #fff;
}
button.act {
    border: 1px solid var(--smp-line);
    background: #fff;
    border-radius: 6px;
    padding: 7px 12px;
    font: inherit;
    cursor: pointer;
}
button.act:disabled {
    opacity: 0.45;
    cursor: default;
}
button.act.primary {
    background: var(--smp-ink);
    color: #fff;
    border-color: var(--smp-ink);
}
input[type="date"] {
    font: inherit;
    padding: 6px 8px;
    border: 1px solid var(--smp-line);
    border-radius: 6px;
}
label.chk {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}
.lbl {
    color: var(--smp-muted);
    font-size: 14px;
}
#unsaved {
    display: none;
    color: #b35c00;
    font-size: 13px;
}
#hint,
#msg {
    padding: 8px 16px;
    color: var(--smp-muted);
    font-size: 13px;
    white-space: pre-line;
}
body.smp-tool #wrap {
    max-width: 1400px;
    margin: 0 auto 20px;
}
body.smp-tool #wrap img.base {
    display: block;
    width: 100%;
    height: auto;
    min-height: 200px;
    background: #e4e9e4;
}
body.smp-tool .mk {
    cursor: pointer;
}
body.smp-tool .mk.sel .badge {
    outline: 3px solid #ffb400;
}
body.smp-tool .mk.hidden,
body.smp-tool .mk.unlinked {
    opacity: 0.4;
}
details {
    max-width: 1400px;
    margin: 0 auto 30px;
    padding: 0 16px;
}
textarea {
    width: 100%;
    height: 110px;
    font:
        12px/1.4 ui-monospace,
        monospace;
    margin-top: 8px;
}
.mt {
    margin-top: 6px;
}
