﻿/* =========================================================
   RoomDataInfo.css (DE-DUPED)
   Preserves:
   - Current markup expectations (RoomDataComponent)
   - Offcanvas overlay/panel behavior (mobile)
   - Sticky "Room Data" chip styles
   - Item details panel, uploader, thumbnails, confirms, skeleton
   - Suggestions UI
   - Bottom "z-panel" design-system overrides (kept + tightened spacing)
   ========================================================= */


/* =========================================================
   Offcanvas: lower nav z-indexes when open
   ========================================================= */
body:has(.room-info-data.offcanvas-open) .web-topnav,
body:has(.room-info-data.offcanvas-open) .navbar.sticky-top,
body:has(.room-info-data.offcanvas-open) .navbar-bottom,
body:has(.room-info-data.offcanvas-open) .bottom-nav,
body:has(.room-info-data.offcanvas-open) .mobile-nav,
body:has(.room-info-data.offcanvas-open) [class*="nav-bottom"],
body:has(.room-info-data.offcanvas-open) header,
body:has(.room-info-data.offcanvas-open) nav,
body:has(.room-info-data.offcanvas-open) .project-topbar,
/* iOS Safari fallback */
body.roomdata-offcanvas-open .web-topnav,
body.roomdata-offcanvas-open .navbar.sticky-top,
body.roomdata-offcanvas-open .navbar-bottom,
body.roomdata-offcanvas-open .bottom-nav,
body.roomdata-offcanvas-open .mobile-nav,
body.roomdata-offcanvas-open [class*="nav-bottom"],
body.roomdata-offcanvas-open header,
body.roomdata-offcanvas-open nav,
body.roomdata-offcanvas-open .project-topbar {
    z-index: 1 !important;
}


/* =========================================================
   Base container
   ========================================================= */
.room-info-data {
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    margin: 14px auto 0 auto;
    position: relative;
    z-index: 1010;
}

.room-info-data__panel {
    position: relative;
    height: 100%;
    min-height: 0;
}


/* =========================================================
   Header
   ========================================================= */
.room-info-data__header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "top      close"
        "tabs-row tabs-row"
        "meta     meta";
    align-items: center;
    gap: 10px 12px;
    padding: 12px 14px;
   /* border-bottom: 1px solid rgba(0,0,0,.08);*/
}

.room-info-data__hdr-top {
    grid-area: top;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.room-info-data__titlewrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.room-info-data__title {
    font-weight: 900;
    font-size: 1.05rem;
    line-height: 1.2;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-info-data__title-input {
    width: min(360px, 70vw);
    max-width: 100%;
    border: 1px solid rgba(0,0,0,0.14);
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 800;
    font-size: 1rem;
    outline: none;
}

    .room-info-data__title-input:focus {
        border-color: rgba(37,99,235,0.45);
        box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
    }

.room-info-data__iconbtn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.12);
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

    .room-info-data__iconbtn:hover {
        background: #f8fafc;
    }

.room-info-data__close {
    grid-area: close;
    position: relative;
    z-index: 2;
}

.room-info-data__tabs-row {
    grid-area: tabs-row;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.room-info-data__tabs {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.06);
    border: 1px solid rgba(2, 6, 23, 0.08);
}

.room-info-data__tab {
    border: 0;
    background: transparent;
    padding: 7px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.72);
    transition: background 140ms ease, color 140ms ease, transform 120ms ease, box-shadow 140ms ease;
}

    .room-info-data__tab:hover {
        background: rgba(255, 255, 255, 0.60);
        color: rgba(15, 23, 42, 0.88);
    }

.room-info-data__tab--active {
    background: #fff;
    color: rgba(15, 23, 42, 0.95);
    font-weight: 900;
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.14);
}

.room-info-data__tab:active {
    transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
    .room-info-data__tab {
        transition: none !important;
    }
}

.room-info-data__hdr-total-desktop {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.room-info-data__hdr-meta {
    grid-area: meta;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.room-info-data__totals {
    display: flex;
    align-items: center;
    gap: 10px;
}

.room-info-data__totals--mobile {
    display: none;
}

/* Total pill */
.room-info-data__total-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(0,0,0,.03);
    border: 1px solid rgba(0,0,0,.08);
}

.room-info-data__total-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(0,0,0,.55);
}

.room-info-data__total-value {
    font-size: 13px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: rgba(0,0,0,.9);
}

/* Buttons (single source of truth) */
.room-info-data__btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: #fff;
    color: rgba(15, 23, 42, 0.92);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: transform .14s ease, box-shadow .14s ease, filter .14s ease, background .14s ease, border-color .14s ease, color .14s ease;
}

    .room-info-data__btn:hover:not(:disabled) {
        background: rgba(15, 23, 42, 0.03);
        border-color: rgba(15, 23, 42, 0.20);
    }

    .room-info-data__btn:active:not(:disabled) {
        transform: translateY(1px);
    }

    .room-info-data__btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
    }

    .room-info-data__btn:disabled {
        opacity: .6;
        cursor: not-allowed;
        transform: none;
        filter: none;
    }

/* Primary button in the Info tab action bar (Update) */
.room-info-data__actions > .room-info-data__btn {
    border-color: rgba(37, 99, 235, 0.35);
    background: linear-gradient(180deg, rgba(37,99,235,1), rgba(29,78,216,1));
    color: #fff;
    box-shadow: 0 10px 22px rgba(37,99,235,.22);
}

    .room-info-data__actions > .room-info-data__btn:hover:not(:disabled) {
        transform: translateY(-1px);
        filter: brightness(1.02);
        border-color: rgba(37, 99, 235, 0.45);
        box-shadow: 0 14px 30px rgba(37,99,235,.26);
        background: linear-gradient(180deg, rgba(37,99,235,1), rgba(30,64,175,1));
    }

    .room-info-data__actions > .room-info-data__btn:active:not(:disabled) {
        transform: translateY(0);
    }

    .room-info-data__actions > .room-info-data__btn:focus-visible {
        box-shadow: 0 0 0 4px rgba(37,99,235,.22), 0 14px 30px rgba(37,99,235,.26);
    }

.room-info-data__btn--ghost {
    background: transparent;
}

.room-info-data__btn--danger {
    border-color: rgba(220,38,38,.35);
    background: #dc2626;
    color: #fff;
}

    .room-info-data__btn--danger:hover:not(:disabled) {
        background: #b91c1c;
        border-color: rgba(185,28,28,.45);
    }

.room-info-data__btn--danger-outline {
    background: transparent;
    border-color: rgba(220,38,38,.35);
    color: rgba(185,28,28,.95);
}

    .room-info-data__btn--danger-outline:hover:not(:disabled) {
        background: rgba(220,38,38,.06);
        border-color: rgba(220,38,38,.45);
    }

/* Header responsive tweaks */
@media (max-width: 768px) {
    .room-info-data__hdr-total-desktop {
        display: none;
    }

    .room-info-data__totals--mobile {
        display: flex;
    }

    .room-info-data__header {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "top   close"
            "tabs-row tabs-row"
            "meta  meta";
        gap: 10px 10px;
    }

    .room-info-data__title-input {
        width: 100%;
    }

    .room-info-data__hdr-meta {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .room-info-data__btn--danger-outline {
        padding: 8px 10px;
        border-radius: 12px;
        font-weight: 800;
        white-space: nowrap;
    }

    .room-info-data__iconbtn {
        width: 32px;
        height: 32px;
    }
}

/* Visibility helpers */
.room-info-data__mobile-only {
    display: none;
}

.room-info-data__desktop-only {
    display: inline-flex;
}

@media (max-width: 768px) {
    .room-info-data__mobile-only {
        display: inline-flex;
    }

    .room-info-data__desktop-only {
        display: none;
    }
}


/* =========================================================
   Body + common blocks
   ========================================================= */
.room-info-data__body {
    padding: 12px 14px;
}

.room-info-data__section {
    display: block;
}

.room-info-data__empty {
    padding: 18px 10px;
    color: rgba(0,0,0,.55);
    background: rgba(0,0,0,.02);
    border: 1px dashed rgba(0,0,0,.12);
    border-radius: 10px;
    text-align: center;
}

.room-info-data__status {
    margin-left: 6px;
    font-size: 12px;
    font-weight: 650;
    color: rgba(0,0,0,.60);
}

/* Skeleton */
.room-info-data__skeleton {
    padding: 20px;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: room-info-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton--header {
    height: 32px;
    width: 60%;
}

.skeleton--line {
    height: 16px;
    width: 100%;
}

@keyframes room-info-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* KV (supports both spellings used historically) */
.room-info-data__kv {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 14px;
}

.room-info-data__k {
    color: rgba(0,0,0,.55);
    font-weight: 600;
    font-size: 13px;
}

.room-info-data__v,
.room_info_data__v {
    color: rgba(0,0,0,.9);
    font-weight: 600;
    font-size: 13px;
}


/* =========================================================
   Info tab (measurement form)
   ========================================================= */
.room-info-data__info {
    display: grid;
    gap: 12px;
}

.room-info-data__info-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 12px;
    background: rgba(0,0,0,.015);
}

.room-info-data__info-card-title {
    font-size: 12px;
    font-weight: 750;
    color: rgba(0,0,0,.60);
    margin-bottom: 10px;
}

.room-info-data__grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 24px;
    gap: 10px 12px;
}

.room-info-data__grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}

.room-info-data__field {
    display: grid;
    gap: 6px;
}

.room-info-data__label {
    font-size: 12px;
    font-weight: 650;
    color: rgba(0,0,0,.60);
}

.room-info-data__input {
    width: 100%;
    height: 34px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    outline: none;
    font-size: 13px;
}

    .room-info-data__input:focus {
        border-color: rgba(0,0,0,.25);
        box-shadow: 0 1px 2px rgba(0,0,0,.10);
    }

.room-info-data__section-title {
    margin: 14px 0 8px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(0,0,0,.70);
    letter-spacing: .02em;
}

.room-info-data__actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,.08);
}

.room-info-data__scanbtn {
    margin-left: auto;
}

.room-info-data__spacer {
}

@media (max-width: 520px) {
    .room-info-data__grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .room-info-data__grid-2 {
        grid-template-columns: 1fr;
    }

    .room-info-data__spacer {
        grid-column: 1 / -1;
        height: 0;
    }
}


/* =========================================================
   Images tab (uploader + thumbs + modal)
   ========================================================= */
.room-info-data__uploader {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    background: #fff;
    padding: 14px 14px 12px;
    margin-bottom: 12px;
}

.room-info-data__uploader-title {
    font-size: 13px;
    font-weight: 800;
    color: rgba(0,0,0,.85);
    margin-bottom: 2px;
}

.room-info-data__uploader-sub {
    font-size: 12px;
    font-weight: 600;
    color: rgba(0,0,0,.55);
    margin-bottom: 10px;
}

.room-info-data__dropzone {
    position: relative;
    display: grid;
    place-items: center;
    border: 2px dashed rgba(0,0,0,.14);
    border-radius: 14px;
    background: rgba(0,0,0,.015);
    min-height: 88px;
    cursor: pointer;
    overflow: hidden;
}

    .room-info-data__dropzone:hover {
        background: rgba(0,0,0,.02);
        border-color: rgba(0,0,0,.20);
    }

    .room-info-data__dropzone.is-dragover {
        background: rgba(0,0,0,.03);
        border-color: rgba(0,0,0,.28);
    }

.room-info-data__file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.room-info-data__dropzone-text {
    text-align: center;
    padding: 10px;
    pointer-events: none;
}

.room-info-data__dropzone-strong {
    font-size: 13px;
    font-weight: 800;
    color: rgba(0,0,0,.85);
}

.room-info-data__dropzone-muted {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(0,0,0,.55);
}

.room-info-data__upload-actions {
    display: inline-flex;
    gap: 8px;
    margin-top: 10px;
}

.room-info-data__pending {
    margin: 12px 0;
}

.room-info-data__pending-title {
    font-size: 12px;
    font-weight: 750;
    color: rgba(0,0,0,.60);
    margin: 0 0 8px 2px;
}

.room-info-data__thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.room-info-data__thumb-grid--pending {
    opacity: .95;
}

.room-info-data__thumb-wrap {
    position: relative;
}

.room-info-data__thumb {
    width: 100%;
    display: block;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0,0,0,.02);
    aspect-ratio: 1 / 1;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    transition: transform .10s ease, box-shadow .10s ease;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

    .room-info-data__thumb:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,.10);
    }

    .room-info-data__thumb:active {
        transform: translateY(0);
    }

    .room-info-data__thumb:focus-visible {
        outline: 3px solid rgba(37, 99, 235, 0.30);
        outline-offset: 2px;
    }

.room-info-data__thumb--pending {
    cursor: default;
}

.room-info-data__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.room-info-data__thumb-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 12px;
    color: rgba(0,0,0,.55);
}

.room-info-data__thumb-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.14);
    background: rgba(255,255,255,.92);
    color: rgba(15, 23, 42, 0.95);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 0;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    opacity: 0.95;
    transition: opacity .12s ease, transform .12s ease, background .12s ease;
}

.room-info-data__thumb-wrap:hover .room-info-data__thumb-delete {
    opacity: 1;
    transform: scale(1.05);
}

.room-info-data__thumb-delete:hover {
    background: #fff;
}

.room-info-data__thumb-delete:active {
    transform: scale(0.98);
}

.room-info-data__thumb-delete:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.30);
    outline-offset: 2px;
}

.room-info-data__thumb-delete:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Image modal */
.room-info-data__imgmodal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.room-info-data__imgmodal {
    position: relative;
    width: min(960px, 96vw);
    max-height: 90dvh;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.room-info-data__imgmodal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.14);
    background: rgba(255,255,255,.92);
    cursor: pointer;
    font-size: 22px;
    font-weight: 900;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.room-info-data__imgmodal-img {
    width: 100%;
    height: auto;
    max-height: 90dvh;
    object-fit: contain;
    display: block;
    background: #0b1220;
}


/* =========================================================
   Scope tab (list)
   ========================================================= */
.room-info-data__section.room-info-data__scope {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.room-info-data__scope-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-right: 6px;
    scrollbar-gutter: stable;
}

.room-info-data__scope-actions {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 14px 0;
    padding: 0;

}

/* Trade group */
.room-info-data__trade-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.room-info-data__trade-hdr {
    flex: 0 0 auto;
    padding: 10px 12px;
    background: rgba(0,0,0,.03);
    border-bottom: 1px solid rgba(0,0,0,.08);
}

.room-info-data__trade-title {
    font-size: 13px;
    font-weight: 750;
    color: rgba(0,0,0,.85);
}

.room-info-data__trade-body {
    display: grid;
    gap: 10px;
    padding: 10px 12px;
}

.room-info-data__trade-rowwrap {
    display: block;
}

/* Row */
.room-info-data__trade-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: background-color 0.2s;
}

    .room-info-data__trade-row:last-child {
        border-bottom: none;
    }

    .room-info-data__trade-row:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }

.room-info-data__trade-row--compact {
    padding: 9px 12px;
}

.room-info-data__trade-row--warning {
    background-color: #fef3c7;
    border-left: 3px solid #f59e0b;
}

    .room-info-data__trade-row--warning:hover {
        background-color: #fde68a;
    }

.room-info-data__trade-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.room-info-data__trade-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* legacy typo class support */
.room_info_data__trade-item-title--compact {
    font-size: 13px;
    font-weight: 650;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-info-data__trade-item-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}

/* Qty */
.room-info-data__qty {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    background-color: #f3f4f6;
    color: #4b5563;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid #e5e7eb;
}

.room-info-data__qty--zero {
    background-color: #fef3c7;
    color: #92400e;
    border-color: #fbbf24;
    font-weight: 700;
    animation: room-info-attention-pulse 2s ease-in-out infinite;
}

@keyframes room-info-attention-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3);
    }
}

.room-info-data__qty--editable {
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 10px;
    display: inline-block;
    border: 1px solid transparent;
    transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease, transform .12s ease, color .12s ease;
}

@media (hover: hover) and (pointer: fine) {
    .room-info-data__qty--editable:hover {
        background: rgba(37, 99, 235, 0.16);
        border-color: rgba(37, 99, 235, 0.55);
        transform: translateY(-2px) scale(1.02);
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18), 0 0 0 5px rgba(37, 99, 235, 0.22);
        color: rgba(15, 23, 42, 0.98);
    }
}

.room-info-data__qty-input {
    width: 120px;
    padding: 4px 8px;
    border: 1px solid #007bff;
    border-radius: 4px;
    font-size: inherit;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

    .room-info-data__qty-input:focus {
        outline: none;
        border-color: #0056b3;
    }

/* Amount */
.room-info-data__trade-amt {
    font-weight: 600;
    color: #059669;
    font-size: 14px;
    white-space: nowrap;
}

.room_info_data__trade-amt--compact {
    font-size: 12px;
    font-weight: 750;
}

.room-info-data__trade-amt--zero,
.room_info_data__trade-amt--zero {
    color: #dc2626;
    font-weight: 700;
}

@media (max-width: 640px) {
    .room-info-data__trade-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* Right actions */
.room-info-data__row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.room-info-data__details-btn {
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    border-radius: 10px;
    height: 30px;
    width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

    .room-info-data__details-btn:hover {
        background: rgba(0,0,0,.03);
    }

.room-info-data__chev {
    display: inline-block;
    transform: rotate(-90deg);
    transition: transform .15s ease;
    font-size: 14px;
    line-height: 1;
    opacity: .75;
}

.room-info-data__chev--open,
.roominfo_data__chev--open {
    transform: rotate(0deg);
}

/* Delete button */
.room-info-data__delete-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #dc2626;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

    .room-info-data__delete-btn:hover:not(:disabled) {
        background: #fef2f2;
        border-color: #dc2626;
        transform: scale(1.1);
    }

    .room-info-data__delete-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Price spinner */
.room-info-data__price-spinner {
    display: inline-flex;
    align-items: center;
}

.room-info-data__spinner-icon {
    width: 16px;
    height: 16px;
    animation: room-info-spin 1s linear infinite;
}

.room-info-data__spinner-circle {
    fill: none;
    stroke: #007bff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 45;
}

@keyframes room-info-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   Item details drop panel
   ========================================================= */
.room-info-data__item-panel {
    margin: 0 12px 10px 12px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    background: rgba(0,0,0,.02);
    padding: 12px;
}

.room-info-data__item-panel-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.room-info-data__panel-section {
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 12px;
    padding: 12px;
}

.room-info-data__panel-section--note {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.room-info-data__panel-title {
    font-size: 12px;
    font-weight: 750;
    color: rgba(0,0,0,.85);
    margin-bottom: 8px;
}

.room-info-data__allow-row {
    padding: 10px 0;
    border-top: 1px dashed rgba(0,0,0,.10);
}

    .room-info-data__allow-row:first-child {
        border-top: none;
        padding-top: 0;
    }

.room-info-data__allow-name {
    font-size: 12px;
    font-weight: 700;
    color: rgba(0,0,0,.80);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-info-data__panel-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.room-info-data__money {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.room-info-data__money-prefix,
.room_info_data__money-prefix {
    font-weight: 700;
    opacity: .7;
}

.room-info-data__panel-textarea {
    width: 100%;
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 10px;
    padding: 10px;
    font-size: 13px;
    resize: vertical;
}

.room-info-data__panel-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-top: 2px;
}

.room-info-data__panel-btn {
    border: 1px solid rgba(0,0,0,.16);
    background: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
}

.room-info-data__panel-btn--primary {
    border: 1px solid rgba(37, 99, 235, 0.35);
    background: linear-gradient(180deg, rgba(37,99,235,1), rgba(29,78,216,1));
    color: #fff;
    box-shadow: 0 10px 22px rgba(37,99,235,.18);
}

    .room-info-data__panel-btn--primary:hover {
        box-shadow: 0 14px 30px rgba(37,99,235,.22);
        transform: translateY(-1px);
    }

/* Inline save state */
.room-info-data__mini-saving {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .room-info-data__mini-saving::before {
        content: "";
        width: 10px;
        height: 10px;
        border: 2px solid rgba(107,114,128,.35);
        border-top-color: rgba(107,114,128,.9);
        border-radius: 50%;
        animation: room-info-spin .8s linear infinite;
    }

.room-info-data__mini-error {
    font-size: 11px;
    font-weight: 700;
    color: #b91c1c;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .room-info-data__mini-error::before {
        content: "!";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 14px;
        height: 14px;
        font-size: 11px;
        font-weight: 900;
        color: #fff;
        background: #b91c1c;
        border-radius: 50%;
    }


/* =========================================================
   Confirm dialogs
   ========================================================= */
.room-info-data__confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: room-info-fadeIn 0.2s ease-out;
    padding: 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.room-info-data__confirm-dialog {
    background: #fff;
    border-radius: 8px;
    width: min(400px, 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: room-info-slideUp 0.2s ease-out;
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Header */
.room-info-data__confirm-header {
    padding: 24px 24px 0 24px;
    flex: 0 0 auto;
}

    .room-info-data__confirm-header h3 {
        margin: 0 0 16px 0;
        font-size: 18px;
        font-weight: 600;
        color: #111827;
    }

/* Body becomes the scroll area */
.room-info-data__confirm-body {
    padding: 0 24px;
    color: #6b7280;
    line-height: 1.5;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-height: 0; 
}

    .room-info-data__confirm-body strong {
        color: #111827;
        font-weight: 600;
    }

.room-info-data__confirm-warning {
    margin-top: 12px;
    font-size: 14px;
    color: #dc2626;
}

/* Actions stay visible at the bottom */
.room-info-data__confirm-actions {
    padding: 16px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex: 0 0 auto;
}

/* Mobile: full-width buttons for thumb reach */
@media (max-width: 576px) {
    .room-info-data__confirm-actions {
        justify-content: stretch;
        padding: 14px 16px 16px 16px;
    }

        .room-info-data__confirm-actions .room-info-data__btn {
            flex: 1 1 0;
            min-height: 44px;
        }

    .room-info-data__confirm-header {
        padding: 16px 16px 0 16px;
    }

    .room-info-data__confirm-body {
        padding: 0 16px;
    }
}

/* Preview: cap height so it can’t push actions off-screen */
.room-info-data__confirm-preview {
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(0,0,0,.02);
    max-height: clamp(140px, 30dvh, 240px);
}

    .room-info-data__confirm-preview img {
        width: 100%;
        height: 100%;
        object-fit: cover; 
        display: block;
    }


@keyframes room-info-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes room-info-slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* =========================================================
   Suggestions
   ========================================================= */
.room-info-data__suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.10);
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 700;
    color: rgba(0,0,0,.72);
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

    .room-info-data__suggestion-chip:hover {
        background: #f1f3f5;
        border-color: rgba(0,0,0,0.14);
        box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    }

    .room-info-data__suggestion-chip:active {
        background: #e9ecef;
        box-shadow: none;
    }

    .room-info-data__suggestion-chip:focus-visible {
        outline: 2px solid rgba(13,110,253,0.35);
        outline-offset: 2px;
    }

.room-info-data__suggestion-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(0,0,0,0.08);
    color: rgba(0,0,0,.85);
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
}

.room-info-data__suggestions-panel {
    margin-top: 0.6rem;
    padding: 0.65rem 0.75rem;
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid rgba(0,0,0,0.08);
    border-left: 4px solid #0d6efd;
}

.room-info-data__suggestions-header {
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    font-size: 13px;
    font-weight: 750;
    color: #212529;
    line-height: 1.2;
}

.room-info-data__suggestion-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    min-width: 0;
}

    .room-info-data__suggestion-item:last-child {
        border-bottom: 0;
    }

.room-info-data__suggestion-content {
    min-width: 0;
}

.room-info-data__suggestion-name {
    font-size: 13px;
    font-weight: 400;
    color: rgba(0,0,0,.92);
    line-height: 1.2;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.room-info-data__suggestion-actions {
    display: flex;
    gap: 0.5rem;
}

.room-info-data__suggestion-add {
    justify-self: end;
    padding: 0.25rem 0.4rem;
    border: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: #0d6efd;
    line-height: 1;
    border-radius: 0.4rem;
    cursor: pointer;
}

    .room-info-data__suggestion-add:hover {
        background: rgba(13,110,253,0.08);
    }

    .room-info-data__suggestion-add:active {
        background: rgba(13,110,253,0.14);
    }

.room-info-data__suggestion-dismiss {
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid #dc3545;
    border-radius: 4px;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    transition: all 0.15s ease;
}

    .room-info-data__suggestion-dismiss:hover {
        background: #dc3545;
        color: #fff;
    }

.room-info-data__suggestions-empty {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

@media (max-width: 576px) {
    .room-info-data__suggestion-item {
        grid-template-columns: 1fr;
        row-gap: 0.35rem;
        padding: 0.6rem 0;
    }

    .room-info-data__suggestion-add {
        justify-self: start;
        padding: 0.3rem 0.5rem;
    }

    .room-info-data__suggestion-name {
        -webkit-line-clamp: 3;
    }
}


/* =========================================================
   Offcanvas (mobile)
   ========================================================= */
@media (min-width: 769px) {
    .room-info-data__close {
        display: none;
    }
}

@media (max-width: 768px) {
    /* elevate the subtree above sticky headers */
    .room-info-data.offcanvas-open {
        position: fixed;
        inset: 0;
        z-index: 2147483000;
        pointer-events: none;
        isolation: isolate;
    }

        .room-info-data.offcanvas-open .offcanvas-overlay,
        .room-info-data.offcanvas-open .room-info-data__panel {
            pointer-events: auto;
        }

    .room-info-data .offcanvas-overlay {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.50);
        z-index: 2147483001;
        opacity: 0;
        pointer-events: none;
        transition: opacity 260ms cubic-bezier(.2,.9,.2,1);
    }

    .room-info-data.offcanvas-open .offcanvas-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .room-info-data__panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        height: 100svh;
        height: 100dvh;
        width: min(95vw, 420px);
        max-width: 420px;
        background: #fff;
        z-index: 2147483002;
        box-shadow: -12px 0 28px rgba(0,0,0,0.18);
        transform: translate3d(100%, 0, 0);
        visibility: hidden;
        pointer-events: none;
        transition: transform 320ms cubic-bezier(.2,.9,.2,1), visibility 0s linear 320ms;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        will-change: transform;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        box-sizing: border-box;
    }

    .room-info-data.offcanvas-open .room-info-data__panel {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
        transition: transform 320ms cubic-bezier(.2,.9,.2,1);
    }

    /* safe-area padding goes on header/body */
    .room-info-data__header {
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
    }

    .room-info-data__body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
        padding: 12px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .room-info-data__close {
        border: 1px solid rgba(0,0,0,0.12);
        background: #fff;
        color: #0f172a;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        line-height: 0;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        pointer-events: auto;
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
        transition: background 150ms ease, transform 100ms ease;
    }

        .room-info-data__close:hover {
            background: #f8fafc;
        }

        .room-info-data__close:active {
            background: #e2e8f0;
            transform: scale(0.95);
        }

    @media (prefers-reduced-motion: reduce) {
        .room-info-data__panel,
        .room-info-data .offcanvas-overlay {
            transition: none !important;
        }
    }
}


/* =========================================================
   Sticky chip (mobile)
   ========================================================= */
.roomdata-sticky {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    padding: 8px 12px 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.roomdata-chip {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    transition: box-shadow 160ms ease, transform 120ms ease, border-color 160ms ease, background 160ms ease;
}

    .roomdata-chip.roomdata-chip--primary {
        background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
        border: 2px solid rgba(37, 99, 235, 0.30);
        box-shadow: 0 10px 22px rgba(2, 6, 23, 0.10);
        border-radius: 14px;
        padding: 12px 12px;
        color: #0f172a;
    }

        .roomdata-chip.roomdata-chip--primary:hover {
            background: #ffffff;
            border-color: rgba(37, 99, 235, 0.45);
            box-shadow: 0 12px 26px rgba(2, 6, 23, 0.14);
        }

        .roomdata-chip.roomdata-chip--primary:active {
            transform: translateY(1px);
        }

        .roomdata-chip.roomdata-chip--primary:focus-visible {
            outline: 3px solid rgba(37, 99, 235, 0.30);
            outline-offset: 2px;
        }

.roomdata-chip__left {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.roomdata-chip__room {
    font-size: 1.02rem;
    font-weight: 900;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roomdata-chip__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 750;
    color: rgba(15, 23, 42, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roomdata-chip__dot {
    opacity: 0.5;
}

.roomdata-chip__hint {
    opacity: 0.85;
}

.roomdata-chip__count-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.10);
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.roomdata-chip__count {
    color: rgba(37, 99, 235, 0.98);
    font-weight: 900;
}

.roomdata-chip__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding-left: 10px;
    margin-left: 10px;
    border-left: 1px solid rgba(2, 6, 23, 0.10);
    flex: 0 0 auto;
}

.roomdata-chip__total-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: rgba(15, 23, 42, 0.70);
    line-height: 1.1;
}

.roomdata-chip__total-value {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.01em;
    color: #0f172a;
    line-height: 1.1;
}

.roomdata-chip.is-total-updated {
    animation: roomdataChipPulse 520ms cubic-bezier(.2,.9,.2,1);
}

@keyframes roomdataChipPulse {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 10px 22px rgba(2, 6, 23, 0.10);
        border-color: rgba(37, 99, 235, 0.30);
    }

    40% {
        transform: translateY(-1px) scale(1.01);
        box-shadow: 0 16px 34px rgba(2, 6, 23, 0.16);
        border-color: rgba(37, 99, 235, 0.55);
    }

    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 10px 22px rgba(2, 6, 23, 0.10);
        border-color: rgba(37, 99, 235, 0.30);
    }
}

.roomdata-chip__count-pill.is-pulsing {
    animation: roomdataCountPillPulse 650ms cubic-bezier(.2,.9,.2,1);
}

    .roomdata-chip__count-pill.is-pulsing .roomdata-chip__count {
        animation: roomdataCountTextPop 650ms cubic-bezier(.2,.9,.2,1);
    }

@keyframes roomdataCountPillPulse {
    0% {
        transform: scale(1);
        background: rgba(37, 99, 235, 0.10);
        border-color: rgba(37, 99, 235, 0.18);
        box-shadow: 0 0 0 rgba(37, 99, 235, 0);
    }

    35% {
        transform: scale(1.06);
        background: rgba(37, 99, 235, 0.18);
        border-color: rgba(37, 99, 235, 0.45);
        box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
    }

    100% {
        transform: scale(1);
        background: rgba(37, 99, 235, 0.10);
        border-color: rgba(37, 99, 235, 0.18);
        box-shadow: 0 0 0 rgba(37, 99, 235, 0);
    }
}

@keyframes roomdataCountTextPop {
    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.10);
    }

    100% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .roomdata-chip,
    .roomdata-chip.is-total-updated,
    .roomdata-chip__count-pill.is-pulsing,
    .roomdata-chip__count-pill.is-pulsing .roomdata-chip__count {
        transition: none !important;
        animation: none !important;
    }
}


/* =========================================================
   Z-PANEL design system overrides (KEEP AT BOTTOM)
   ========================================================= */

/* Outer card off inside z-panel */
.z-panel .room-info-data {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.z-panel .room-info-data__panel {
    height: 100%;
    min-height: 0;
}

/* Header feels like a subtle surface */
.z-panel .room-info-data__header {
    background: transparent !important;
    /*border-bottom: 1px solid var(--border) !important;*/
    padding: 14px 0 10px 0 !important;
    gap: 10px !important;
    position: relative;
}

.z-panel .room-info-data__title {
    color: var(--text-primary) !important;
    font-weight: var(--fw-bold) !important;
    letter-spacing: -0.01em;
}

/* Tabs: lighter + modern */
.z-panel .room-info-data__tabs {
    background: var(--bg-surface-2) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-pill) !important;
    padding: 6px !important;
}

/*.z-panel .room-info-data__tab {
    color: var(--text-muted) !important;
}*/

    .z-panel .room-info-data__tab--active,
    .z-panel .room-info-data__tabs > button[aria-selected="true"] {
        background: var(--bg-surface) !important;
        color: var(--text-primary) !important;
        border: 1px solid var(--border) !important;
        box-shadow: none !important;
        border-radius: var(--r-pill);
        border-radius: var(--r-pill);
    }

/* Total pill */
.z-panel .room-info-data__total-pill {
    background: var(--bg-surface-2) !important;
    border: 1px solid var(--border) !important;
    border-radius: 999px !important;
}

.z-panel .room-info-data__total-value {
    color: var(--text-primary) !important;
    font-weight: var(--fw-bold) !important;
}

/* IMPORTANT: removes the weird band under header */
.z-panel .room-info-data__body {
    padding: 10px 0 0 0 !important;
    margin-top: 0 !important;
}

.z-panel .room-info-data__tabs-row {
    margin: 0 !important;
}

/* Scope spacing fixes */
.z-panel .room-info-data__section.room-info-data__scope {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.z-panel .room-info-data__scope-scroll {
    border-top: 0 !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.z-panel .room-info-data__scope-actions {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 14px 0 !important;
    padding: 0 !important;
    border-bottom: 0 !important;
}

/* Trade card */
.z-panel .room-info-data__trade-card {
    border: 1px solid var(--border) !important;
    border-radius: var(--r-16) !important;
    box-shadow: none !important;
    overflow: hidden;
    background: var(--bg-surface) !important;
}

/* Trade header */
.z-panel .room-info-data__trade-hdr {
    background: transparent !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 12px 14px !important;
}

.z-panel .room-info-data__trade-title {
    font-size: 12px !important;
    font-weight: var(--fw-bold) !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
}

/* Rows */
.z-panel .room-info-data__trade-row {
    background: transparent !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    padding: 12px 14px !important;
}

    .z-panel .room-info-data__trade-row:hover {
        background: var(--bg-surface-2) !important;
    }

.z-panel .room-info-data__trade-row--warning {
    background: rgba(245, 158, 11, 0.10) !important;
    border-left: 3px solid rgba(245, 158, 11, 0.55) !important;
}

/* Item typography */
.z-panel .room-info-data__trade-item-title,
.z-panel .room_info_data__trade-item-title--compact {
    font-size: 13px !important;
    font-weight: var(--fw-semibold) !important;
    color: var(--text-primary) !important;
}

/* Qty pill */
.z-panel .room-info-data__qty {
    background: var(--bg-surface-2) !important;
    border: 1px solid var(--border) !important;
    border-radius: 999px !important;
    color: var(--text-muted) !important;
    font-weight: var(--fw-semibold) !important;
    padding: 4px 10px !important;
}

@media (hover: hover) and (pointer: fine) {
    .z-panel .room-info-data__qty--editable:hover {
        background: rgba(0, 102, 204, 0.10) !important;
        border-color: rgba(0, 102, 204, 0.30) !important;
        box-shadow: none !important;
        transform: translateY(-1px) !important;
        color: var(--text-primary) !important;
    }
}

/* Price */
.z-panel .room-info-data__trade-amt,
.z-panel .room-info-data__trade-amt--compact,
.z-panel .room_info_data__trade-amt--compact {
    color: var(--brand-primary) !important;
    font-weight: var(--fw-bold) !important;
    font-variant-numeric: tabular-nums;
    font-size: 14px !important;
}

/* Action buttons */
.z-panel .room-info-data__details-btn,
.z-panel .room-info-data__delete-btn {
    background: var(--bg-surface) !important;
    border: 1px solid var(--border) !important;
    box-shadow: none !important;
}

.z-panel .room-info-data__delete-btn {
    color: #dc2626 !important;
}

    .z-panel .room-info-data__details-btn:hover,
    .z-panel .room-info-data__delete-btn:hover:not(:disabled) {
        background: var(--bg-surface-2) !important;
    }

/* Suggestions */
.z-panel .room-info-data__suggestion-chip {
    background: var(--bg-surface-2) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-muted) !important;
}

.z-panel .room-info-data__suggestion-chip-count {
    background: rgba(0,0,0,0.06) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
}

.z-panel .room-info-data__suggestions-panel {
    border: 1px solid var(--border) !important;
    border-left: 4px solid var(--brand-primary) !important;
    border-radius: var(--r-16) !important;
    box-shadow: none !important;
}

.z-panel .room-info-data__suggestion-add {
    color: var(--brand-primary) !important;
}

    .z-panel .room-info-data__suggestion-add:hover {
        background: rgba(0, 102, 204, 0.10) !important;
    }

/* Delete outline button (room + delete all) */
.z-panel .room-info-data__btn--danger-outline {
    background: transparent !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220,38,38,0.55) !important;
    box-shadow: none !important;
}

    .z-panel .room-info-data__btn--danger-outline:hover:not(:disabled) {
        background: rgba(220,38,38,0.08) !important;
        border-color: rgba(220,38,38,0.70) !important;
    }

/* z-panel close button */
.z-panel .room-info-data__close {
    position: absolute;
    top: 10px;
    right: 0;
    width: 38px;
    height: 38px;
    border-radius: var(--r-12);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: none;
    transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
}

    .z-panel .room-info-data__close:hover {
        background: var(--bg-surface-2);
    }

    .z-panel .room-info-data__close:active {
        transform: translateY(1px);
    }


/* =========================================================
   OFFCANVAS: fix left/right padding (remove double-inset)
   ========================================================= */
@media (max-width: 768px) {

    /* One source of horizontal padding: the panel header + body */
    .room-info-data.offcanvas-open .room-info-data__header,
    .room-info-data.offcanvas-open .room-info-data__body {
        padding-left: calc(14px + env(safe-area-inset-left, 0px)) !important;
        padding-right: calc(14px + env(safe-area-inset-right, 0px)) !important;
    }

    /* Kill extra horizontal insets coming from inner containers/cards */
    .room-info-data.offcanvas-open .room-info-data__trade-card,
    .room-info-data.offcanvas-open .room-info-data__item-panel,
    .room-info-data.offcanvas-open .room-info-data__scope-actions,
    .room-info-data.offcanvas-open .room-info-data__trade-row,
    .room-info-data.offcanvas-open .room-info-data__trade-rowwrap {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* If any rows were using margin as “spacing”, keep spacing via padding instead */
    .room-info-data.offcanvas-open .room-info-data__trade-body {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}


/* =========================================================
   OFFCANVAS: make scope-scroll the real scroller (Android-safe)
   ========================================================= */

.room-info-data.offcanvas-open .room-info-data__panel {
    position: fixed;
    inset: 0 0 0 auto; /* right panel */
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* header stays fixed */
.room-info-data.offcanvas-open .room-info-data__header {
    flex: 0 0 auto;
}

/* body becomes a flex column container (not the scroller) */
.room-info-data.offcanvas-open .room-info-data__body {
    flex: 1 1 auto;
    min-height: 0; /* REQUIRED or scroll will clip */
    display: flex;
    flex-direction: column;
}

/* THIS is the scroller */
.room-info-data.offcanvas-open .room-info-data__scope {
    flex: 1 1 auto;
    min-height: 0; /* REQUIRED */
    display: flex;
    flex-direction: column;
}

.room-info-data.offcanvas-open .room-info-data__scope-scroll {
    flex: 1 1 auto;
    min-height: 0; /* REQUIRED */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* prevents last items hiding under Android nav bar / gesture area */
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

/* fallback for browsers without dvh */
@supports not (height: 100dvh) {
    .room-info-data.offcanvas-open .room-info-data__panel {
        height: 100vh;
        max-height: 100vh;
    }
}
