﻿/* Mobile first (under 768px) */
body {
    padding-top: 85px;
    padding-bottom: 77px;
}

/* Tablets/desktop (768px and up) */
@media screen and (min-width: 768px) {
    body {
        padding-bottom: 97px;
    }

    .jumbotron {
        margin-top: 20px;
    }

    .body-content {
        padding: 0;
    }
}


.dl-horizontal dt {
    white-space: normal;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="select"] {
    max-width: 100%;
}

.ProfileBtn {
    width: 45px;
    height: 45px;
    cursor: pointer;
    margin-bottom: 30px;
    margin-left: 20px;
}

.DimButtons {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-right: 5px;
}

#BackBtn {
    cursor: pointer;
}

.LightWhiteBack {
    background-color: #F8F8F8;
}

.MediumWhiteBack {
    background-color: #efeff4;
}

.FlexDisplay {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: space-between;
    align-items: center;
    height: 45px;
}

.FlexOptions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: flex-end;
    align-items: center;
    height: 45px;
}

.FlexHeight {
    height: 65px;
    padding-top: 22px;
}

.LayoutHeight {
    padding-top: 10px;
    height: 60px;
}

.FlexMargin {
    padding-left: 20px;
    padding-right: 20px;
}

.FlexBorder {
    border-top: 2px solid #EFEFF4;
    border-bottom: 2px solid #EFEFF4;
    padding-top: 8px;
}

.pageLabel {
    font-size: 36px;
    font-weight: bold;
    top: 0;
    left: 0;
    color: black;
    margin-bottom: 30px;
}

.PageDiv {
    padding-left: 20px;
    padding-right: 20px;
}

.NameDiv {
    padding-left: 10px;
    padding-right: 10px;
}

.InfoLabel {
    font-family: Roboto, sans-serif;
    font-weight: 500;
    font-size: 17px;
    color: #8E8E93;
    margin: 15px;
}

.InfoLayout {
    color: #9A9A9F;
    font-family: Roboto,sans-serif;
    font-weight: 500;
    font-size: large;
    margin: 16px;
}

.InfoDiv {
    background: #D1D1D6
}

.LightLargeLabel {
    font-family: Roboto,sans-serif;
    font-size: large;
    color: black;
}

.LighterLargeLabel {
    font-family: Roboto,sans-serif;
    font-size: large;
    font-weight: bold;
    color: #707174;
}


.DarkMedLabel {
    font-family: Roboto,sans-serif;
    font-size: medium;
    font-weight: bold;
    color: black
}

.DarkLargeLabel {
    font-family: Roboto,sans-serif;
    font-size: 21px;
    font-weight: bold;
    color: black
}

.MHeader {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding-left: 6px;
    background: #F8F8F8;
}

.BTNback {
    color: #F4364C;
    font-weight: 500;
    font-size: large;
    margin-left: 4px;
    cursor: pointer;
}

.IMGback {
    margin-bottom: 4px;
    width: 15px;
    height: 20px;
    cursor: pointer;
}

.PHeader {
    display: flex;
    flex-direction: row;
    align-items: center;
    align-content: center;
    flex-wrap: nowrap;
    cursor: pointer;
    justify-content: space-between;
    background: #F8F8F8;
    padding-top: 5px;
}

#btnAlertOK {
    cursor: pointer;
}

.AModal {
    display: flex;
    flex-direction: column;
    padding: 15px;
}


.centerAll {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: auto;
    width: 100%;
}

.menuButtons {
    width: 95px;
}

@media (max-width: 767px) {
    .menuButtons {
        width: 75px;
    }
}

#btnLogin {
    cursor: pointer;
    font-size: 28px;
    font-weight: bold;
    color: white;
}

#header {
    position: fixed;
    left: 0;
    top: 0;
    height: 85px;
    width: 100%;
    z-index: 99999;
    background-color: #F8F8F8;
    border-bottom: 2px solid #EFEFF4;
}

#footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: #fff;
    color: #000;
    text-align: center;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 2px solid #EFEFF4;
    z-index: 99999;
}

.img {
    height: 512px;
    left: 50%;
    margin-top: -256px;
    margin-left: -256px;
    position: absolute;
    top: 45%;
    width: 512px;
    z-index: -9998;
}

.background {
    min-height: 100%;
    min-width: 1024px;
    width: 100%;
    height: auto;
    position: fixed;
    top: 0;
    left: 0;
    z-index: -9999;
}

.cenHyp {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}

.setTopRight {
    margin: 0;
    top: 18px;
    right: 18px;
    position: absolute;
}

.hide {
    display: none;
}

.fullHeight {
    margin-top: 68px;
    margin-bottom: 74px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#ajax_result {
    position: absolute;
    z-index: 1001;
    bottom: 0;
    left: 0;
    right: 0;
    background: red;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 3.5;
    overflow: hidden;
    -webkit-box-shadow: 0 0 5px black;
    -moz-box-shadow: 0 0 5px black;
    box-shadow: 0 0 5px black;
}


/*========================================
    1) CSS Variables
  ========================================*/
:root {
    --thumb-size: 120px;
    --card-padding: 1.5rem;
    --swipe-left: calc(var(--thumb-size) * 3);
    --swipe-right: calc(var(--thumb-size) * 2);
    --button-font-size: .9rem;
    --label-font-size: 1.4rem;
    --reveal-percent: 50%;
}

#slideSortable {
    list-style: none; 
    margin: 0; 
    padding: 0; 
}

    #slideSortable .device-item {
        margin-left: 0; 
    }
/*========================================
    2) List Reset
  ========================================*/
#sortable {
    list-style: none;
    margin: 0;
    padding: 0;
}

/*========================================
    3) Card Container Frame
  ========================================*/
.device-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: border-color .3s ease, box-shadow .3s ease;
}

    .device-item:hover {
        border-color: #90caf9;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

button[data-action] {
    touch-action: manipulation;
}

/*========================================
    4) Swipe Panels (underneath the face)
  ========================================*/
.swipe-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #B7D1FB;
    pointer-events: none;
    z-index: 0;
}

/*========================================
    5) Action Zones
  ========================================*/
.device-actions-left,
.device-actions-right {
    position: absolute;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

.device-actions-left {
    left: 0;
    width: 50%;
}

.device-actions-right {
    right: 0;
    width: 50%;
}

    /*========================================
    6) Buttons in the action zones
  ========================================*/
    .device-actions-left button,
    .device-actions-right button {
        flex: 1;
        border: none;
        display: flex;
        height: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: var(--button-font-size);
        cursor: pointer;
        white-space: nowrap;
        touch-action: manipulation;
    }

    .device-actions-left.active-panel,
    .device-actions-right.active-panel {
        z-index: 2;
              pointer-events: auto;
    }

.device-actions-left .shutdown {
    order: 1;
    background: #f0f0f0;
    color: #666;
}

.device-actions-left .restart {
    order: 2;
    background: #ccc;
    color: #666;
}

.device-actions-left .location {
    order: 3;
    background: #ff6600;
    color: #fff;
}

.device-actions-right .settings {
    background: #ccc;
    color: #fff;
}

.device-actions-right .trash {
    background: #c00;
    color: #fff;
}

/*========================================
    7) Card Face
  ========================================*/
.device-main {
    position: relative;
    z-index: 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: var(--card-padding);
    width: 100%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    user-select: none;
    cursor: grab;
    touch-action: pan-y;
    padding: 0 0 0 0;
}

    .device-main.closed {
        transform: translateX(0);
    }

    .device-main.open-left {
        transform: translateX(var(--swipe-left));
    }

    .device-main.open-right {
        transform: translateX(calc(-1 * var(--swipe-right)));
    }

    .device-main.active {
        background-color: #bbd9f9;
    }

.device-thumb {
    flex-shrink: 0;
    width: var(--thumb-size);
    height: var(--thumb-size);
    object-fit: cover;
}

#slideSortable .device-actions-left,
#slideSortable .device-actions-right {
    width: calc(var(--thumb-size) * 2) !important;
}

#slideSortable {
    --swipe-left: calc(var(--thumb-size) * 2);
    --swipe-right: calc(var(--thumb-size) * 2);
}

.status-dot {
    flex: 0 0 16px; 
    width: 16px;
    height: 16px;
    margin-right: 1rem;
    border-radius: 50%;
    background: #6c757d;
}

    .status-dot.online {
        background: #28a745;
    }

.device-label {
    flex: 1 1 auto;
    font-weight: bold;
    font-size: var(--label-font-size);
    min-width: 0; 
    white-space: normal; 
    word-wrap: break-word;
    margin-right: 2.5rem;
}

/* drag handle */
.drag-handle {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    cursor: grab;
    z-index: 2;
}

    .drag-handle i {
        font-size: 1.2rem;
    }

body.reorder-mode .swipe-content,
body.reorder-mode .ui-sortable-placeholder .swipe-content {
    display: none !important;
}

/*========================================
    8) “Activate New Device” Card
  ========================================*/
.activate-wrapper {
    margin-bottom: 1rem;
}

    .activate-wrapper .device-item.activate-only {
        position: relative;
        overflow: hidden;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        background: #fff;
        transition: border-color .3s ease, box-shadow .3s ease;
        cursor: pointer;
    }

        .activate-wrapper
        .device-item.activate-only:hover {
            border-color: #90caf9;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .activate-wrapper
        .device-item.activate-only .device-main {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            width: 100%;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
            user-select: none;
            touch-action: none;
            transform: translateX(0) !important;
            background: #fff;
            cursor: pointer;
            padding: 0 0 0 0;
        }

    .activate-wrapper .activate-square {
        width: var(--thumb-size);
        height: var(--thumb-size);
        background: #f44336;
        border-radius: 8px 0 0 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .activate-wrapper .plus-icon {
        font-size: 2.5rem;
        color: #fff;
        pointer-events: none;
    }

    .activate-wrapper .device-label {
        font-weight: bold;
        font-size: var(--label-font-size);
        color: #333;
    }

    .activate-wrapper .swipe-content {
        display: none !important;
    }

.device-actions-left .editSlide {
    background: #ccc; 
    color: #fff;
}

.device-actions-right .remove {
    background: #c00;
    color: #fff;
}

/*──────────────────────────────────────────
  Turn the playlist .device-thumb into a 2×2 square
──────────────────────────────────────────*/
#sortable .device-item.playlist-item .device-thumb {
    width: var(--thumb-size) !important;
    height: var(--thumb-size) !important;
    padding: 0 !important;
    border-radius: 8px 0 0 8px !important;
    overflow: hidden;
    display: grid !important;
    gap: 1px;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

    #sortable .device-item.playlist-item .device-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }


#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

    #loading-overlay.hidden {
        display: none;
    }

.spinner {
    width: 60px;
    height: 60px;
    border: 8px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.TrackStyle {
    height: 80px
}

.trackbar {
    position: relative;
    height: 40px;
    width: 85%;
}

.track-line {
    position: absolute;
    top: calc((40px - 6px)/2);
    left: 0;
    width: 100%;
    height: 6px;
    border-radius: 2px;
    background: #ddd;
    z-index: 1;
}

.track-selector {
    position: absolute;
    top: calc((40px - 6px)/2);
    left: 0;
    width: 0;
    height: 6px;
    border-radius: 2px;
    background: red;
    z-index: 2;
}

.track-button {
    position: absolute;
    top: 5px;
    left: 0;
    width: 34px;
    height: 30px;
    border-radius: 50%;
    background: hsl(0,0%,78%);
    z-index: 3;
    cursor: pointer;
}

.track-percentage {
    display: none;
    position: absolute;
    top: -36px;
    left: 0;
    transform: translateX(-50%);
    background: #FF3B30;
    color: #fff;
    padding: 4px 8px;
    font-size: .8rem;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 4;
}

.trackbar.dragging .track-percentage {
    display: block;
}

.track-percentage::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #FF3B30;
}

.select-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

    .select-wrapper select {
        appearance: none;
        width: 100%;
        background: transparent;
        border: none;
        padding-right: 24px;
        font-size: 1rem;
        color: #888;
        text-align: right;
        cursor: pointer;
    }

        .select-wrapper select:focus {
            outline: none;
        }

    .select-wrapper .arrow {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        font-size: 1rem;
        color: #ccc;
    }

.toggle-container {
    position: relative;
    width: 36px;
    height: 14px;
    margin-left: auto;
}

.track-level {
    font-weight: bold;
    text-align: right;
    width: 100%;
}

    .toggle-container input {
        opacity: 0;
        width: 0;
        height: 0;
    }

    .toggle-container label {
        position: absolute;
        top: 0;
        left: 0;
        width: 36px;
        height: 14px;
        background: #E5E5EA; 
        border-radius: 7px;
        cursor: pointer;
        transition: background .2s;
    }

        .toggle-container label::before {
            content: "";
            position: absolute;
            top: -3px;
            left: -3px;
            width: 20px;
            height: 20px;
            background: #F0F0F5;
            border-radius: 50%;
            transition: transform .2s, background .2s, box-shadow .2s;
            box-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }

    .toggle-container input:checked + label {
        background: #C6F6D5; 
    }

        .toggle-container input:checked + label::before {
            transform: translateX(19px);
            background: #2F855A; 
            box-shadow: none;
        }

#audienceMonitorModal .modal-content {
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 14px 28px rgba(0,0,0,.22), 0 10px 10px rgba(0,0,0,.12);
}

#audienceMonitorList .list-group-item {
    background: #fff;
    border-color: #e9ecef;
}

    #audienceMonitorList .list-group-item.active,
    #audienceMonitorList .list-group-item.active:hover,
    #audienceMonitorList .list-group-item.active:focus {
        background: #0d6efd;
        color: #fff;
        border-color: #0d6efd;
        box-shadow: 0 0 0 3px rgba(13,110,253,.2) inset; 
    }

        #audienceMonitorList .list-group-item.active .fa-check {
            color: #fff !important;
            opacity: 1 !important;
        }

    #audienceMonitorList .list-group-item:not(.active):hover {
        background: #f8fafc;
    }

#deviceSettingsModal .ds-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content:space-evenly;
}

#deviceSettingsModal .toggle-row {
    display: flex;
    align-items: center;
    gap: .75rem;
}

#deviceSettingsModal .toggle-text {
    user-select: none;
    color: #495057;
    margin-right: auto; 
    margin-top:7px
}

#deviceSettingsModal .toggle-container {
    position: relative;
    width: 36px;
    height: 20px; 
    flex: 0 0 36px;
    margin-left: 12px;
}

    #deviceSettingsModal .toggle-container label {
        top: 50%;
        transform: translateY(-50%);
    }

        #deviceSettingsModal .toggle-container label::before {
            top: 50%;
            transform: translateY(-50%);
        }

    #deviceSettingsModal .toggle-container input:checked + label::before {
        transform: translate(19px, -50%);
    }



.disabled-trackbar {
    pointer-events: none;
    opacity: 0.6;
}


.content-wrapper {
    padding: 0 16px;
}

.ios-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

    .ios-list li {
        border-bottom: 1px solid #ccc;
        margin: 0 -16px; 
        padding: 0 16px; 
    }

.ios-input {
    width: 100%;
    border: none;
    padding: 16px 0;
    font-size: 17px;
    background: transparent;
    box-sizing: border-box;
    outline: none;
    -webkit-appearance: none;
}

    .ios-input::placeholder {
        color: #888;
        font-weight: 500;
    }

.action-row .action-btn {
    width: 100%;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 600;
    border-radius: 0;
    border: none;
}

.btn-success.action-btn {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.btn-danger.action-btn {
    background-color: rgba(192, 0, 0, 0.1);
    color: #c00;
}

.about-section {
    margin: 24px 0 16px;
    padding: 0;
}

    .about-section h2 {
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 12px;
        color: #000;
    }

.about-links {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

    .about-links li {
        margin-bottom: 6px;
        font-size: 15px;
    }

    .about-links a {
        text-decoration: none;
        color: #007aff;
    }

.remove-account-container {
    text-align: left;
    margin-bottom: 8px;
}

.remove-account-link {
    font-size: 14px;
    color: #c00;
    text-decoration: none;
}

.ios-list li.action-row:last-child {
    border-bottom: none !important;
}

.action-btn,
#btnConfirm,
#btnLogout {
    box-shadow: none !important;
}

.list-group-item.selected-card {
    background-color: #f4364c !important;
    color: white !important;
}
    .list-group-item.selected-card .SortableLabel,
    .list-group-item.selected-card .LayoutStatus,
    .list-group-item.selected-card img {
        color: white !important;
        filter: brightness(0) invert(1) !important;
    }

.list-group-item .LayoutStatus.playing-label {
    color: #f4364c !important;
}

.disabled-btn {
    opacity: 0.4 !important;
}

.multiline-ellipsis {
    display: -webkit-box; 
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.modal {
    z-index: 100000 !important; 
}

.modal-backdrop {
    z-index: 99998 !important; 
    }

#deviceSettingsModal .modal-dialog {
    max-width: 880px;
}

#deviceSettingsModal .modal-body {
    padding-bottom: .75rem;
}

#deviceSettingsModal .device-settings-top {
    display: grid;
    grid-template-columns: minmax(320px, 1.25fr) minmax(320px, 1fr);
    gap: 20px;
    align-items: stretch;
    height: clamp(240px, 38vh, 420px); 
    overflow: hidden; 
}

#deviceSettingsModal .ds-thumb {
    width: 100%;
    height: 100%; 
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    background: #f8f9fa;
    overflow: hidden;
}

    #deviceSettingsModal .ds-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

#deviceSettingsModal .ds-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: auto; 
    scrollbar-gutter: stable both-edges;
}

    #deviceSettingsModal .ds-right .form-floating {
        position: relative;
        margin: 0;
    }

        #deviceSettingsModal .ds-right .form-floating > .form-control {
            height: calc(3.5rem + 2px);
            padding: 1rem .75rem;
            line-height: 1.25;
            font-size: 1rem;
        }

        #deviceSettingsModal .ds-right .form-floating > label {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            padding: 1rem .75rem;
            pointer-events: none;
            transform-origin: 0 0;
            transition: opacity .1s ease-in-out, transform .1s ease-in-out;
        }

        #deviceSettingsModal .ds-right .form-floating > .form-control::placeholder {
            color: transparent;
        }

        #deviceSettingsModal .ds-right .form-floating > .form-control:focus,
        #deviceSettingsModal .ds-right .form-floating > .form-control:not(:placeholder-shown) {
            padding-top: 1.625rem;
            padding-bottom: .625rem;
        }

            #deviceSettingsModal .ds-right .form-floating > .form-control:focus ~ label,
            #deviceSettingsModal .ds-right .form-floating > .form-control:not(:placeholder-shown) ~ label {
                opacity: .65;
                transform: scale(.85) translateY(-.5rem) translateX(.15rem);
            }

#deviceSettingsModal label[for="profileImageInput"].btn {
    padding: .45rem .6rem;
    font-size: .925rem;
    line-height: 1.2;
}

#deviceSettingsModal #audienceContentSelector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

#deviceSettingsModal .ds-toggles {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: space-evenly;
}

#deviceSettingsModal .form-check.form-switch .form-check-label {
    margin-left: .25rem;
    user-select: none;
}

#deviceSettingsModal .ds-version {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1rem;
    color: #495057;
}

    #deviceSettingsModal .ds-version #playerVersion {
        font-size: .95rem;
        padding: .35rem .55rem;
        border-radius: .4rem;
    }

@media (max-width: 768px) {
    #deviceSettingsModal .device-settings-top {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        height: auto; 
        overflow: visible;
    }

    #deviceSettingsModal .ds-thumb {
        width: 100%;
        height: clamp(240px, 38vh, 420px); 
        border: 1px solid #dee2e6;
        border-radius: .5rem;
        background: #f8f9fa;
        overflow: hidden;
    }

        #deviceSettingsModal .ds-thumb img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

    #deviceSettingsModal .ds-right {
        width: 100%;
        max-width: 640px;
        margin-inline: auto;
        height: auto;
        max-height: none;
        overflow: visible; 
    }

    #deviceSettingsModal .ds-toggles {
        justify-content: flex-start;
    }

    #deviceSettingsModal .ds-version {
        margin-top: 0;
    }
}


.thumb-wrap {
    position: relative;
    display: inline-block; 
    border-radius: 12px; 
}

    .thumb-wrap img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: inherit;
    }

.thumb-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-weight: 700;
    font-size: 1.35rem;
    pointer-events: none;
    border-radius: inherit;
    opacity: 0;
    transition: opacity .2s ease;
    flex-direction: column;
    line-height: 1.05;
}

    .thumb-overlay .pct {
        font-size: 1.35rem;
        font-weight: 700;
    }

    .thumb-overlay .mb {
        margin-top: .25rem;
        font-size: .9rem;
        opacity: .9;
        font-weight: 600;
    }

    .thumb-overlay.active {
        opacity: 1;
    }

/* Success flash */
@keyframes thumbFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(76,175,80,0);
        transform: scale(1);
    }

    35% {
        box-shadow: 0 0 0 12px rgba(76,175,80,.35);
        transform: scale(1.02);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(76,175,80,0);
        transform: scale(1);
    }
}

.thumb-wrap.flash {
    animation: thumbFlash 700ms ease-out 1;
}


/* —— Shared Zone Modal ——————————————————————————— */
.zone-modal .modal-dialog {
    max-width: 640px;
}

.zone-modal .modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    overflow: hidden;
}

.zone-modal .modal-title {
    font-weight: 600;
    letter-spacing: .2px;
}

.zone-modal .modal-body {
    padding: 16px 18px 6px;
}

/* Grid */
.zone-modal .field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Full-width overrides */
.zone-modal .zone-full {
    grid-column: 1 / -1;
}

/* Labels & inputs */
.zone-modal .form-label {
    margin-bottom: .25rem;
    color: #495057;
    font-weight: 600;
    font-size: .925rem;
}

.zone-modal .form-control {
    border-radius: 10px;
    border-color: #dee2e6;
}

    .zone-modal .form-control:focus,
    .zone-modal .btn-outline-field:focus {
        box-shadow: 0 0 0 .2rem rgba(21,161,255,.15);
        border-color: #15a1ff;
        outline: none;
    }

/* Unit suffix (px) */
.zone-modal .input-unit {
    position: relative;
}

    .zone-modal .input-unit .unit {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-size: .85rem;
        color: #6c757d;
        pointer-events: none;
    }

    .zone-modal .input-unit .form-control {
        padding-right: 46px;
    }

/* Source selector row */
.zone-modal .btn-outline-field {
    width: 100%;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .zone-modal .btn-outline-field:hover {
        background: #f9fafb;
    }

    .zone-modal .btn-outline-field .chev {
        opacity: .45;
        font-weight: 700;
    }

/* Footer */
.zone-modal .modal-footer .btn {
    border-radius: 10px;
    padding: .55rem .9rem;
}



#ZoneContainer svg g.zone-group {
    cursor: pointer;
}

