/* ── Brand colours ─────────────────────────────────── */
.bg-pt-dark   { background-color: #1a1a1a !important; }
.text-pt-dark  { color: #1a1a1a !important; }
.border-pt-accent { border-color: #efaa39 !important; }

.btn-pt-accent {
    background-color: #efaa39;
    color: #1a1a1a;
    border-color: #efaa39;
}
.btn-pt-accent:hover,
.btn-pt-accent:focus-visible {
    background-color: #d8942a;
    border-color: #d8942a;
    color: #1a1a1a;
}

/* ── Navbar tweaks ────────────────────────────────── */
.navbar .nav-link.active {
    background: #efaa39;
    color: #1a1a1a !important;
    border-radius: 4px;
}

/* ── Form inputs — match Bootstrap control styling on Django widgets ── */
input:not([type="hidden"]),
select,
textarea {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
input:focus,
select:focus,
textarea:focus {
    border-color: #efaa39;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(239, 170, 57, .25);
}

/* ── Error lists (Django) ─────────────────────────── */
.errorlist {
    list-style: none;
    padding: .5rem .75rem;
    margin: .25rem 0 0;
    font-size: .875rem;
    color: var(--bs-danger);
}

/* ── Copy-button success state ────────────────────── */
.copied {
    background-color: #d9f2e3 !important;
    border-color: #8ecaa4 !important;
    color: #1d5b34 !important;
}

/* ── Friction map dots and cluster icons ────────────── */
.friction-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.friction-dot.selected {
    transform: scale(1.5);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a1a1a;
    border-color: #1a1a1a;
}

.friction-cluster {
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #1a1a1a;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

/* ── Friction band filter circles ──────────────────── */
.friction-band-filter {
    height: 31px;
    align-items: center;
}

.friction-band-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #000;
    cursor: pointer;
    padding: 0;
    opacity: 0.25;
    transition: opacity 0.15s, box-shadow 0.15s;
}

.friction-band-btn.active {
    opacity: 1;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a1a1a;
}

.friction-band-btn[data-band="red"]    { background-color: red; }
.friction-band-btn[data-band="orange"] { background-color: orange; }
.friction-band-btn[data-band="yellow"] { background-color: yellow; }
.friction-band-btn[data-band="green"]  { background-color: green; }

/* ── Map page ─────────────────────────────────────── */
.map-page-root {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
    padding: 1rem;
}

.map-page-shell {
    position: relative;
    flex: 1 1 auto;
    min-height: calc(100vh - 220px);
    overflow: hidden;
}

.map-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    pointer-events: none;
}

.map-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-canvas,
#map {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 220px);
}

/* ── Image Sidebar ────────────────────────────────── */
.image-sidebar {
    position: absolute;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.image-sidebar.show {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f5f5f5;
    flex-shrink: 0;
}

.sidebar-header h5 {
    color: #333;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.sidebar-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    object-fit: cover;
}

.sidebar-details {
    font-size: 0.9rem;
    line-height: 1.6;
}

.sidebar-details p {
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.sidebar-details strong {
    color: #555;
}

@media (max-width: 991.98px) {
    .map-page-shell {
        min-height: calc(100vh - 200px);
    }

    .map-canvas,
    #map {
        min-height: calc(100vh - 200px);
    }

    .image-sidebar {
        width: min(100%, 360px);
        right: calc(-1 * min(100%, 360px));
    }
}

