﻿#logoBox {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 6px 0 12px;
    padding: 4px 0 8px;
    cursor: pointer;
}

#flag {
    height: 28px;
    width: auto;
    display: block;
}

#logoText {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
}

html, body { height: 100%; overflow: hidden; }
body { margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; color:#111827; }
#map { height:100vh; }
.preview-overlay {
    pointer-events:none;
}
.leaflet-draw-toolbar,
.leaflet-draw-actions {
    display: none !important;
}
.leaflet-top.leaflet-left {
    left: auto;
    right: 16px;
}
.panel {
    position:absolute;
    top:0;
    left:0;
    background: #61615d;
    border:1px solid #bfc6d2;
    padding:12px;
    border-radius:0 16px 16px 0;
    box-shadow: 7px 0 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,0.75);
    z-index:1000;
    min-width: 210px;
    box-sizing: border-box;
}
#uiPanel {
    min-width: 218px;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.panel-section {
    margin-top: 10px;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.panel-toggle {
    cursor: pointer;
    padding: 6px 14px;
    border: 1px solid #3f3f3f;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-radius: 10px;
    color: #e6eef7;
    background: linear-gradient(180deg, #6a6a6a 0%, #4d4d4d 100%);
    text-shadow: 0 1px 0 rgba(0,0,0,0.45);
    box-shadow: 0 3px 0 rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    min-height: 46px;
}



.panel-toggle::after {
    content: none;
}

.panel-toggle:hover {
    background: linear-gradient(180deg, #727272 0%, #515151 100%);
}

.panel-toggle .panel-icon {
    width: 43px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* font-size: 0; */
    /* line-height: 1; */
    /* flex: 0 0 30px; */
    /* border-radius: 6px; */
    /* background: linear-gradient(180deg, #f3f4f6 0%, #d1d5db 100%); */
    /* border: 1px solid #9ca3af; */
    /* box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); */
    background-size: 44px 44px;
    background-repeat: no-repeat;
    background-position: center;
}
.panel-toggle .panel-icon[data-icon="more-map"] {
    background-image: url("/projects/dev_project/icons/moremapoptions.svg");
}
.panel-toggle .panel-icon[data-icon="overlay-boundaries"] {
    background-image: url("/projects/dev_project/icons/overlayboundaries.svg");
}
.panel-toggle .panel-icon[data-icon="feature-visibility"] {
    background-image: url("/projects/dev_project/icons/featurevisibility.svg");
}

.panel-toggle .panel-arrow {
    margin-left: auto;
    font-size: 18px;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.panel-content {
    display: none;
    padding: 12px;
    margin-top: 0;
    background: #ffffff;
    border: 1px solid #d0d6e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

.panel-section.panel-open .panel-content {
    display: block;
}
.panel-section.panel-open .panel-arrow {
    transform: none;
}

.panel-section.panel-open .panel-toggle {
    background: linear-gradient(180deg, #35db2f 0%, #20b021 100%);
    border-color: #148c18;
    color: #f8fbff;
    box-shadow: 0 3px 0 rgba(10, 90, 14, 0.65), inset 0 1px 0 rgba(255,255,255,0.3);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.map-style-toggle {
    display: flex;
    gap: 8px;
}
.style-btn {
    flex: 1 1 0;
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
}
.style-btn.is-active,
.style-btn.active {
    background: #dbeafe;
    border-color: #93c5fd;
}
.map-style-content {
    margin-top: 8px;
}
.map-style-content .panel-row {
    margin: 12px 0;
    font-size: 14px;
    color: #2d333b;
}
#uiPanel .panel-main > .panel-row:first-of-type {
    font-size: 18px;
    font-weight: 700;
    margin-top: 2px;
    margin-bottom: 10px;
}
#previewStatus {
    color: #5b6775;
    font-size: 16px;
}
.area-warning {
    display: none;
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #f5d08a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
    max-width: min(720px, 92vw);
    text-align: center;
}
.area-warning.is-blocking {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fecaca;
}
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 16, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2800;
    padding: 20px;
}
.confirm-overlay.is-open {
    display: flex;
}
.confirm-modal {
    background: #ffffff;
    border-radius: 16px;
    padding: 18px 20px 16px;
    max-width: 420px;
    width: 92vw;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
    border: 1px solid rgba(15, 23, 42, 0.12);
}
.confirm-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}
.confirm-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.5;
    white-space: pre-wrap;
}
.confirm-body .confirm-warn {
    display: block;
    margin-top: 8px;
    font-weight: 700;
    color: #b45309;
}
.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 16px;
}
.confirm-actions button {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-weight: 600;
    cursor: pointer;
}
.confirm-actions button.confirm-primary {
    background: linear-gradient(180deg, #6fd25b 0%, #3e9e32 100%);
    border-color: #2f7f27;
    color: #ffffff;
}

.map-style-content .frame-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-style-content .frame-row input[type="color"] {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #6b7280;
    border-radius: 3px;
    background: #fff;
}

.map-style-content .reset-row {
    display: flex;
    justify-content: center;
}
#resetAllStylesBtn {
    background: #e5e7eb;
    border-color: #cbd5e1;
    color: #374151;
}
#resetAllStylesBtn:hover {
    background: #d1d5db;
    border-color: #cbd5e1;
}
.overlay-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.overlay-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.overlay-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.overlay-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.overlay-label {
    color: #374151;
}
.overlay-color-row input[type="color"] {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #6b7280;
    border-radius: 3px;
    background: #fff;
}

.overlay-input-row input[type="number"] {
    width: 64px;
}
.map-style-toggle:has(#layoutWebBtn.is-active) ~ .styled-map-content {
    display: block !important;
}
.map-style-toggle:has(#layoutDefaultBtn.is-active) ~ .styled-map-content {
    display: none !important;
}
#layoutOptions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.panel-stack {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    pointer-events: none;
}
.panel-stack .panel {
    position: relative;
    top: auto;
    left: auto;
    pointer-events: auto;
}
.panel-search-block {
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #bfc6d2;
}
.panel-search-block .panel-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #ffffff;
    text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}
.panel-search-block .panel-row {
    margin: 10px 0;
}
.panel-search-block .search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel-search-block .search-actions .paper-fit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #ffffff;
    white-space: nowrap;
}
.panel-search-block .search-actions input[type="color"] {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid #6b7280;
    border-radius: 3px;
    background: #fff;
}
.panel-search-block .postcode-search-status {
    margin-top: 2px;
}
.panel-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.panel-footer {
    margin-top: auto;
    padding: 12px 0 8px;
    text-align: center;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.4;
    border-top: 1px solid rgba(255,255,255,0.15);
}
body.disable-export-scale .export-scale-row {
    display: none;
}
.panel-right {
    left: auto;
    right: 10px;
    max-width: 260px;
    max-height: 50vh;
    overflow: auto;
}
.panel-title {
    font-size: 13px;
    font-weight: 700;
    /* margin: 0 0 8px 0; */
    color: #ffffff;
}
  .panel-row {
      margin: 4px 0;
      font-size: 17px;
  }
  .postcode-search-status {
      margin-top: 6px;
      font-size: 12px;
      color: #7f8a96;
      min-height: 16px;
  }
  .postcode-search-status.is-error {
      color: #d26a6a;
  }
.layout-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.layout-buttons {
    display: flex;
    gap: 6px;
}
.layout-options {
    display: none;
    gap: 12px;
    margin-left: auto;
}
.layout-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #555;
}
.layout-option input {
    margin-top: 4px;
}
.paper-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.paper-fit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #374151;
    white-space: nowrap;
}
.mode-tree {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mode-group {
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.mode-group-toggle {
    width: 100%;
    text-align: left;
    padding: 6px 10px;
    border: 0;
    background: #f6f6f6;
    font-weight: 600;
    cursor: pointer;
}
.mode-group.is-open .mode-group-toggle {
    background: #e9f1ff;
    color: #0b62d6;
}
.mode-group-toggle::after {
    content: ">";
    float: right;
    transition: transform 0.2s ease;
}
.mode-group.is-open .mode-group-toggle::after {
    transform: rotate(90deg);
}
.mode-group-items {
    display: none;
    padding: 6px;
    gap: 6px;
}
.mode-group.is-open .mode-group-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mode-item {
    padding: 6px 10px;
    border: 1px solid #d0d0d0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
}
.mode-item.is-active {
    border-color: #0b62d6;
    background: #e9f1ff;
}
.panel button {
    padding: 8px 14px;
    border: 1px solid #b9c2cf;
    background: linear-gradient(180deg, #ffffff 0%, #e8edf3 100%);
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    height: 42px;
    color: #2d333b;
    font-weight: 600;
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 4px rgba(0,0,0,0.12);
}

.panel button:hover {
    background: linear-gradient(180deg, #ffffff 0%, #dde5ef 100%);
}

.panel button.is-active {
    border-color: #6b7c93;
    background: linear-gradient(180deg, #eef2f7 0%, #d9e1ec 100%);
}

.panel button:disabled {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
}

#selectAreaBtn,
#generateBtn,
#buyBtn {
    background: linear-gradient(180deg, #6fd25b 0%, #3e9e32 100%);
    border-color: #2f7f27;
    color: #fff;
    text-shadow: 0 1px 0 rgba(0,0,0,0.35);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 3px 6px rgba(0,0,0,0.25);
    height: 46px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
}
#selectAreaBtn {
    width: 100%;
    font-size: 17px;
    font-weight: 600;
}

#uiPanel .area-actions {
    display: flex;
    gap: 10px;
}
#uiPanel .area-actions #selectAreaBtn {
    flex: 1 1 auto;
    width: auto;
}
#resetAreaBtn {
    flex: 0 0 110px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
    color: #6b7280;
    text-shadow: none;
    box-shadow: none;
    height: 46px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
}
#resetAreaBtn:disabled {
    cursor: not-allowed;
    opacity: 1;
}
#uiPanel.selection-active #selectAreaBtn {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
    color: #6b7280;
    text-shadow: none;
    box-shadow: none;
}
#uiPanel.selection-active #selectAreaBtn:hover {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
}
#uiPanel.selection-active #resetAreaBtn {
    background: linear-gradient(180deg, #e6f4e6 0%, #d5ead5 100%);
    border-color: #9bc79b;
    color: #2f7f27;
    text-shadow: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}
#uiPanel.selection-active #resetAreaBtn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255,255,255,0.6);
}

#selectAreaBtn:hover,
#generateBtn:hover,
#buyBtn:hover {
    background: linear-gradient(180deg, #78da64 0%, #45a83a 100%);
    border-color: #2f7f27;
}

#generateBtn:disabled {
    background: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%);
    border-color: #cbd5e1;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 1;
    box-shadow: none;
    text-shadow: none;
}

#generateBtn.is-muted {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
    color: #6b7280;
    text-shadow: none;
    box-shadow: none;
}
#generateBtn.is-muted:hover {
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
}

.panel button.select-like {
    width: 100%;
    text-align: left;
    padding: 8px 40px 8px 44px;
    position: relative;
    background-color: #fdfdfd;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'><rect x='1' y='1' width='20' height='20' rx='4' fill='%23d7ead0' stroke='%238ca08a'/><path d='M4 16l3-8 4 3 4-5 3 6' fill='none' stroke='%235b8f5a' stroke-width='1.5'/><circle cx='8' cy='8' r='2' fill='%2389c27d'/></svg>"), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23333' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: left 12px center, right 12px center;
    background-size: 22px 22px, 10px 6px;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 4px rgba(0,0,0,0.12);
    height: 46px;
    font-size: 15px;
}


.panel button.select-like::after {
    content: "";
}
.panel button.select-like.needs-map-selection {
    border-color: #f87171;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 0 0 3px rgba(248,113,113,0.7), 0 6px 20px rgba(248,113,113,0.45);
}
.panel button.select-like.needs-map-selection::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 14px;
    pointer-events: none;
    box-shadow: 0 0 0 0 rgba(248,113,113,0.85), 0 0 28px rgba(248,113,113,0.6);
    opacity: 0;
    animation: selectPulse 1.4s ease-out infinite;
}
@keyframes selectPulse {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(248,113,113,0.85), 0 0 26px rgba(248,113,113,0.65);
    }
    70% {
        opacity: 0;
        box-shadow: 0 0 0 14px rgba(248,113,113,0), 0 0 34px rgba(248,113,113,0);
    }
    100% {
        opacity: 0;
        box-shadow: 0 0 0 0 rgba(248,113,113,0), 0 0 0 rgba(248,113,113,0);
    }
}

#selectedMapStyleLabel {
    display: none;
}
.panel a {
    color: #0b62d6;
    text-decoration: none;
}
.panel a:hover {
    text-decoration: underline;
}
.pdf-ready {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    color: #2d333b;
    font-weight: 700;
}

.pdf-ready .pdf-tick {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: linear-gradient(180deg, #6fd25b 0%, #3e9e32 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.2);
}

.pdf-link {
    font-weight: 700;
    color: #2b67c7;
}
.buy-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
#buyBtn {
    flex: 0 0 auto;
    padding: 0 18px;
}
.price-tag {
    font-weight: 700;
    color: #2d333b;
}
.debug-production-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.debug-production-row button {
    flex: 0 0 auto;
}
.debug-production-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #e2e8f0;
}
.debug-production-spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(226, 232, 240, 0.55);
    border-top-color: #7dd3fc;
    animation: spin 0.8s linear infinite;
    display: none;
    box-sizing: border-box;
}
.debug-production-status a {
    color: #7dd3fc;
    font-weight: 700;
    text-decoration: none;
}
.debug-production-status a:hover {
    text-decoration: underline;
}


.pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid #d0d0d0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    color: #111;
}
.pdf-btn:hover {
    border-color: #0b62d6;
}
.pdf-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
}
.select-area-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.select-area-icon {
    width: 18px;
    height: 14px;
    border: 2px dotted rgba(255,255,255,0.9);
    border-radius: 2px;
    box-sizing: border-box;
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}

.panel select {
    width: 100%;
    padding: 8px 40px 8px 44px;
    border: 1px solid #b9c2cf;
    border-radius: 10px;
    background-color: #fdfdfd;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path d='M5 3h7l3 3v11H5z' fill='%23f4f6f9' stroke='%239aa3b2'/><path d='M12 3v3h3' fill='none' stroke='%239aa3b2'/></svg>"), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23333' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
    background-repeat: no-repeat;
    background-position: left 12px center, right 12px center;
    background-size: 18px 18px, 10px 6px;
    appearance: none;
    font-size: 15px;
    height: 46px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 4px rgba(0,0,0,0.12);
}


.panel input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #b9c2cf;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f6 100%);
    height: 33px;
}

.panel input[type="number"] {
    padding: 8px 12px;
    border: 1px solid #b9c2cf;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f6 100%);
    height: 40px;
}

.panel label {
    color: #2d333b;
}
.panel input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #5b6b7c;
    margin: 0;
}

/* Dark panel text on the base panel background */
#uiPanel .panel-main > .panel-row,
#uiPanel .panel-main > #previewStatus {
    color: #f8fafc;
}
#uiPanel .panel-main > .panel-row .paper-fit {
    color: #f8fafc;
}
#uiPanel .pdf-ready,
#uiPanel .pdf-link,
#uiPanel .price-tag {
    color: #f8fafc;
}
#uiPanel .pdf-link {
    color: #ffd45a;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}
#uiPanel .pdf-link:hover {
    color: #ffe7a3;
}

#searchPanel .panel-title,
#searchPanel .search-actions .paper-fit,
#searchPanel .postcode-search-status {
    color: #f8fafc;
}

#uiPanel .paper-row + .paper-fit {
    margin-top: 6px;
}

.panel-row .paper-fit + .paper-fit {
    margin-left: 12px;
}
.spinner-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.35);
    z-index: 2000;
}
.render-gauge {
    min-width: 220px;
    padding: 14px 16px;
    border: 2px solid #7cc63a;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    text-align: left;
}
.render-gauge__title {
    font-weight: 800;
    color: #2d333b;
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}
.render-gauge__bar {
    position: relative;
    width: 180px;
    height: 14px;
    border: 2px solid #7cc63a;
    background: repeating-linear-gradient(
        90deg,
        #e5e7eb 0 8px,
        #f3f4f6 8px 12px
    );
    overflow: hidden;
    box-sizing: border-box;
}
.render-gauge__fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: repeating-linear-gradient(
        90deg,
        #3dbb32 0 8px,
        #73d46c 8px 12px
    );
}
.color-picker {
    position: fixed;
    display: none;
    z-index: 3000;
    background: #ffffff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.payment-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 2500;
}
.payment-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(420px, 92vw);
    background: #0b0f17;
    color: #f8fafc;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 2600;
    box-shadow: -12px 0 30px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
}
.payment-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}
.payment-drawer__title {
    font-weight: 700;
    font-size: 16px;
}
.payment-drawer__close {
    background: transparent;
    border: 0;
    color: #94a3b8;
    font-size: 20px;
    cursor: pointer;
}
.payment-drawer__body {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1 1 auto;
}
.payment-drawer__status {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
}
.payment-summary {
    display: none;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 12px;
    margin-top: 10px;
}
.payment-summary__title {
    font-weight: 700;
    margin-bottom: 8px;
}
.payment-summary__row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin: 6px 0;
    color: #e2e8f0;
}
.payment-summary__row span {
    color: #f8fafc;
}
.payment-summary__links a {
    display: inline-block;
    margin-top: 8px;
    color: #7dd3fc;
    font-weight: 700;
    text-decoration: none;
}
.payment-download-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.payment-build-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid #6ea6d9;
    background: linear-gradient(180deg, #9cd7ff 0%, #6fb7f0 100%);
    color: #000000;
    font-weight: 700;
    cursor: pointer;
}
.payment-build-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}
.payment-download-spinner {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #e2e8f0;
}
.payment-download-spinner .spinner-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(226, 232, 240, 0.55);
    border-top-color: #7dd3fc;
    animation: spin 0.8s linear infinite;
    box-sizing: border-box;
}
.payment-download-ready {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 1px solid #3b8f3b;
    background: linear-gradient(180deg, #9de28f 0%, #4fbf5a 100%);
    color: #000000 !important;
    font-weight: 800;
    text-decoration: none;
}
.payment-download-ready:visited,
.payment-download-ready:hover,
.payment-download-ready:active,
.payment-download-ready:focus {
    color: #000000 !important;
}
.payment-download-ready img {
    width: 18px;
    height: 18px;
    display: inline-block;
}
.payment-summary__links a:hover {
    text-decoration: underline;
}
.payment-drawer.is-open {
    transform: translateX(0);
}
.payment-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

#mapStyleModal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 12, 16, 0.7);
    z-index: 2500;
    padding: 20px;
    backdrop-filter: blur(6px);
}
#mapStyleModal[aria-hidden="false"] {
    display: flex;
}
#mapStyleModal .map-style-modal__panel {
    width: min(1100px, 92vw);
    max-height: 82vh;
    background: #0f1115;
    color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#mapStyleModal .map-style-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
#mapStyleModal .map-style-modal__title {
    font-size: 18px;
    font-weight: 600;
}
#mapStyleModal .map-style-modal__close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}
#mapStyleModal .map-style-modal__body {
    padding: 18px 22px 22px;
    overflow-y: auto;
    scroll-behavior: smooth;
}
#mapStyleModal .map-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
#mapStyleModal .map-style-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 180ms ease-out, box-shadow 180ms ease-out, border-color 180ms ease-out;
    aspect-ratio: 16 / 9;
}
#mapStyleModal .map-style-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
#mapStyleModal .map-style-card__label {
    position: absolute;
    left: 12px;
    bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
    z-index: 3;
}
#mapStyleModal .map-style-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    transition: opacity 180ms ease-out;
    z-index: 2;
}
#mapStyleModal .map-style-card__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}
#mapStyleModal .map-style-card__desc {
    font-size: 13px;
    opacity: 0.85;
}
#mapStyleModal .map-style-card.is-hover {
    transform: scale(1.03);
    box-shadow: 0 18px 40px rgba(0,0,0,0.45);
}
#mapStyleModal .map-style-card.is-hover .map-style-card__overlay {
    opacity: 1;
}
#mapStyleModal .map-style-card.is-selected {
    border-color: #22d3ee;
    box-shadow: 0 18px 40px rgba(34,211,238,0.2);
}
#mapStyleModal .map-style-card.is-selected .map-style-card__overlay {
    opacity: 0;
}
#mapStyleModal .map-style-card__check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #22d3ee;
    color: #051017;
    font-size: 14px;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4;
}
#mapStyleModal .map-style-card.is-selected .map-style-card__check {
    display: flex;
}
#mapStyleModal .map-style-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(34,211,238,0.85);
    color: #04141a;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 6px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: none;
    z-index: 4;
}
#mapStyleModal .map-style-card.is-custom .map-style-card__badge {
    display: inline-flex;
}
#mapStyleModal .map-style-card:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
}
.modal-open {
    overflow: hidden;
}

#featureVisibilityControl {
    position: static;
    margin-top: 6px;
    max-width: none;
}
#featureVisibilityControl .panel-toggle {
    border-top: 1px solid #b7c1cc;
}

#featureVisibilityPanel {
    max-height: 60vh;
    overflow: hidden;
}
#featureVisibilityPanel .fv-scroll {
    overflow-y: auto;
    max-height: 45vh;
    padding-right: 6px;
    -webkit-overflow-scrolling: touch;
}
#featureVisibilityPanel .fv-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 8px;
}
#featureVisibilityPanel .fv-group-title {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
#featureVisibilityPanel .fv-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 10px 0;
    font-size: 13px;
    color: #111827;
    cursor: pointer;
}
#featureVisibilityPanel .fv-toggle-label {
    color: #111827;
    flex: 1 1 auto;
}
#featureVisibilityPanel .fv-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
}
#featureVisibilityPanel .fv-status {
    font-size: 12px;
    color: #7f8a96;
    margin-bottom: 8px;
}

@media (max-width: 720px) {
    .panel {
        min-width: 210px;
        width: 78vw;
        border-radius: 0 14px 14px 0;
    }
    #featureVisibilityPanel .fv-scroll {
        max-height: 50vh;
    }
}

.preview-warning{
    position: fixed;
    top: 11;
    left: 304px; /* width of your sidebar */
    right: 0;

    background: #fff3cd;
    border: 2px solid #f0ad4e;

    padding: 5px 20px;

    font-family: Arial, sans-serif;
    font-size: 15px;
    color: #5c4400;

    display: flex;
    align-items: center;
    gap: 12px;

    z-index: 9999;

    margin-right:15px;
}

.warning-icon{
    font-size: 37px;
    color: #e6a100;
    padding-bottom:7px
}

.warning-icon{
    animation: pulse 2s ease-out 2;
}

@keyframes pulse{
    0%{transform:scale(1)}
    50%{transform:scale(1.25)}
    100%{transform:scale(1)}
}

.hidden{
    display:none;
}
