/* ============================================================
   RV Map Trigger Button
   ============================================================ */

.uws-rv-map-trigger-wrap {
    display: inline-block;
}

.uws-rv-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    background-color: #6e431a;
    color: #fafafa;
    border: none;
    border-radius: 6.25em;
    padding: 0.875em 1.75em;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 200ms ease;
}

.uws-rv-trigger-btn:hover {
    background-color: #5a3615;
}

/* ============================================================
   RV Map Popup — Size override
   ============================================================ */

#uws-rv-map-pop .uws-pop-box {
    width: 100%;
    max-width: 62.5em;
    max-height: 100vh;
    overflow-y: auto;
    border-radius: 0.75em;
}

#uws-rv-map-pop .uws-closepop {
    display: none;
}

/* ============================================================
   RV Map Popup — Inner layout
   ============================================================ */

.uws-rv-map-popup {
    display: flex;
    flex-direction: column;
    background-color: #eee8e3;
    overflow: hidden;
}

/* Top Bar */
.uws-rv-map-topbar {
    display: flex;
    align-items: center;
    gap: 2.5em;
    padding: 2.5em 5em;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    justify-content: center;
}

.uws-rv-map-back-btn,
.uws-rv-map-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    border-radius: 12.5em;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    background-color: transparent;
    color: #212121;
    font-size: 1.5em;
    transition: background-color 200ms ease;
}

.uws-rv-map-back-btn:hover {
    background-color: #eee8e3;
}

.uws-rv-map-filter-btn {
    background-color: #eee8e3;
}

.uws-rv-map-filter-btn:hover {
    background-color: #e0d8d0;
}

.uws-rv-map-searchpill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    padding: 16px 24px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6.25em;
    box-shadow: 0 0.25em 0.5em rgba(0, 0, 0, 0.08);
    max-width: 1010px;
    min-width: 0;
    overflow: hidden;
}

.uws-rv-searchpill-text {
    font-size: 1.25em;
    font-weight: 500;
    line-height: 1;
    color: #212121;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: .3em;
}

.uws-rv-arrow>svg {
    height: auto;
    width: 15px;
    transform: rotate(180deg);
}

.uws-rv-arrow path {
    stroke: #616161;
}

.uws-rv-sep {
    font-size: 2em;
    position: relative;
    bottom: .05em;
    color: #9E9E9E;
    margin: 0 .15em;
}

.uws-rv-icon {
    display: flex;
    align-items: center;
    margin-right: .3em;
}

/* Hide map list and internal zoom controls — only show the SVG */
.uws-rv-map-area .uws-map-list,
.uws-rv-map-area .uws-map-zoomcontrols,
.uws-rv-map-area .uwspowby {
    display: none !important;
}

.uws-map-stage {
    padding-bottom: 2em;
}

/* Map Section */
.uws-rv-map-section {
    position: relative;
    overflow: hidden;
    background-color: #eee8e3;
}

.uws-rv-map-area {
    width: 100%;
}

.uws-rv-map-zoom {
    position: absolute;
    top: 1.5em;
    right: 1.5em;
    display: flex;
    gap: 0.75em;
    align-items: center;
}

.uws-rv-map-zoom a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12.5em;
    color: #fafafa;
    font-size: 1.5em;
    text-decoration: none;
    transition: opacity 200ms ease;
}

.uws-rv-map-zoom a span {
    display: none;
}

.uws-rv-map-zoom a.uwsjs-map-zoomout,
.uws-rv-map-zoom a.uwsjs-map-zoomin {
    background-color: #6e431a;
}

.uws-rv-map-zoom a:hover {
    opacity: 0.85;
}

.uws-rv-map-zoom a.uwsdisabled {
    background-color: rgba(110, 67, 26, 0.35);
    pointer-events: none;
}

/* List Section */
.uws-rv-list-section {
    background-color: #fff;
    padding: 2.5em 5em;
    display: flex;
    flex-direction: column;
    gap: 2.5em;
}

.uws-rv-list-title {
    font-size: 1em;
    color: #212121;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
}

.uws-rv-list-back {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    background: none;
    border: none;
    padding: 0;
    color: #6e431a;
    font-size: 1em;
    font-weight: inherit;
    text-transform: capitalize;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: text-decoration 200ms ease;
}

.uws-rv-list-back:hover {
    text-decoration: underline;
}

.uws-rv-list-back--hidden {
    display: none;
}

.uws-rv-list-title-text--hidden {
    display: none;
}

.uws-rv-list-items {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.uws-rv-list-loading {
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 1em;
    color: #616161;
    font-size: 0.9375em;
}

/* ============================================================
   List Items — Cards
   ============================================================ */

.uws-rv-list-item {
    display: flex;
    flex-direction: row;
    gap: 1.5em;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.uws-rv-item-thumbnail {
    width: 10em;
    height: stretch;
    flex-shrink: 0;
    flex-grow: 0;
    border-radius: 0.25em;
    overflow: hidden;
    aspect-ratio: 9 / 11;
    flex-basis: auto;
    flex-grow: 1;
}

.uws-rv-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.uws-rv-item-thumbnail img.uwsimgloading {
    opacity: 0;
    transition: opacity 300ms ease;
}

.uws-rv-item-thumbnail img.uwsloaded {
    opacity: 1;
}

.uws-rv-item-content {
    flex: 1 0 0;
    display: flex;
    flex-direction: row;
    gap: 1.5em;
    align-items: center;
    min-width: 0;
    padding: .5em;
    padding-left: 0;
    flex-basis: 70%;
}

.uws-rv-item-info {
    flex: 1 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.75em;
    min-width: 0;
}

.uws-rv-item-header {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.uws-rv-item-name {
    font-size: 1.5em;
    font-weight: 500;
    color: #212121;
}

.uws-rv-item-capacity {
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    background-color: #eeeeee;
    border-radius: 6.25em;
    padding: 0.25em 0.75em;
    color: #757575;
    flex-shrink: 0;
}

.uws-rv-item-capacity span {
    font-size: 0.875em;
    color: #0f122b;
}

.uws-rv-item-descr {
    font-size: 1.125em;
    color: #616161;
    line-height: 1.5;
    margin: 0;
}

.uws-rv-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.uws-rv-item-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    background: #EEE8E3;
    color: #6E431A;
    font-size: 0.75em;
    font-weight: 500;
    line-height: normal;
    white-space: nowrap;
}

.uws-rv-item-pricing {
    display: flex;
    align-items: flex-end;
    gap: 1.5em;
    flex-wrap: wrap;
}

.uws-rv-item-paynow,
.uws-rv-item-dailyrate {
    font-size: 1.5rem;
    color: #212121;
    white-space: nowrap;
}

:is(.uws-rv-item-paynow,
    .uws-rv-item-dailyrate) strong {
    /* font-size: 1.25em; */
    font-weight: 400;
}

.uws-rv-item-dailyrate-wrap {
    display: flex;
    align-items: center;
    gap: 0.375em;
    position: relative;
}


/* .uws-rv-item-dailyrate strong {
    font-size: 1.25em;
    font-weight: 400;
} */

/* Info icon link — opens pricing breakdown */
.uws-rv-item-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75em;
    height: 1.75em;
    border-radius: 12.5em;
    background-color: #eee8e3;
    color: #6e431a;
    text-decoration: none;
    font-size: 1em;
    flex-shrink: 0;
    transition: background-color 200ms ease;
}

.uws-rv-item-info-btn:hover {
    background-color: #e0d8d0;
    color: #6e431a;
}

.uws-rv-item-pricing-note {
    font-size: 1.125em;
    color: #616161;
    margin: 0;
}

.uws-rv-select-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25em;
    height: 3.25em;
    border-radius: 5em;
    border: none;
    background-color: #6e431a;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 200ms ease;
}

.uws-rv-select-btn svg {
    height: 2em;
    width: 2em;
}

.uws-rv-select-btn:hover {
    background-color: #5a3615;
}

/* ============================================================
   [PHASE4-SELECTION] Card hover + map section highlight
   ============================================================ */

/* Subtle card hover */
.uws-rv-list-item {
    border-radius: 0.5em;
    transition: background-color 200ms ease;
    /* padding: 0.5em; */
}

.uws-rv-list-item:hover {
    background-color: #f5f0eb;
}

/* Card is selected (first click) — second click opens the modal */
.uws-rv-list-item.uws-rv-item-active {
    background-color: #eee8e3;
    outline: 2px solid #6e431a;
    outline-offset: -2px;
}

/* SVG section hover: uses native .uwshigh from map.css (--uws-map-available-hover) */
/* SVG section selected (from map click): same color, persists until deselection */
.uws-rv-map-area .uws-rv-sec-selected {
    fill: var(--uws-map-available-hover) !important;
    stroke: var(--uws-map-available-hover) !important;
}

.uws-rv-item-header-cont {
    display: flex;
    flex-direction: column;
    gap: .75em;
}

.uws-rv-item-info .uws-rv-item-dailyrate-wrap :is(.uwspricing) {
    display: none;
}

.uws-rv-item-info .uws-rv-item-dailyrate-wrap :is(.uwspricing) {
    position: absolute;
    right: -25%;
}

/* ============================================================
   Responsive
   ============================================================ */

/* --- Mobile and tablet (≤768px): bottom-sheet layout --- */
@media (max-width: 1080px) {
    .uws-rv-item-info .uws-rv-item-dailyrate-wrap :is(.uwspriceitem, .uwspricing) {
        display: flex;
    }

    .uws-rv-item-thumbnail {
        width: 6em;
    }
}

@media (max-width: 989px) and (min-width: 769px) {
    .uws-rv-item-info .uws-rv-item-dailyrate-wrap :is(.uwspriceitem, .uwspricing) {
        right: -16%;
    }
}

@media (max-width: 768px) {
    #uws-rv-map-pop .uws-pop-box {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        margin: 0;
        overflow: hidden;
    }

    .uws-rv-map-popup {
        position: relative;
        width: 100%;
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
        border-radius: 0;
    }

    /* Top bar floats over the map */
    .uws-rv-map-topbar {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10;
        padding: 0.75em 1em;
        gap: 0.5em;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(4px);
    }

    .uws-rv-map-back-btn,
    .uws-rv-map-filter-btn {
        width: 2em;
        height: 2em;
        font-size: 1.32em;
    }

    .uws-rv-map-searchpill {
        padding: 0.5em 0.875em;
    }

    .uws-rv-searchpill-text {
        font-size: 0.875em;
        white-space: nowrap;
        flex-wrap: wrap;
        justify-content: center;
    }

    .uws-rv-guestsinfo {
        justify-content: center;
    }

    /* Map fills the full background */
    .uws-rv-map-section {
        position: absolute;
        top: 31px;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .uws-map-view .uws-map-thumbview {
        display: none;
    }

    .uws-rv-map-zoom {
        top: 4.75em;
        right: 0.75em;
        gap: 0.5em;
    }

    .uws-rv-map-zoom a {
        width: 1.625em;
        height: 1.625em;
        font-size: 1em;
    }

    /* List slides up from the bottom */
    .uws-rv-list-title::before {
        content: "";
        display: block;
        background: #E0E0E0;
        width: 2.5em;
        height: .25em;
        margin: 0 auto 1.88em;
    }

    .uws-rv-list-section {
        position: absolute;
        bottom: -100%;
        left: 0;
        right: 0;
        max-height: 48dvh;
        overflow-y: auto;
        padding: 1.25em 0em;
        gap: 1.88em;
        border-radius: 0.75rem 0.75rem 0 0;
        box-shadow: 0 -4px 12px 0 rgba(0, 0, 0, 0.08);
        z-index: 5;
        transition: all 1.6s ease-in-out;
    }

    .uws-rv-list-section.uwsloaded {
        bottom: 0;
        transition: all 1.6s ease-in-out;
    }

    .uws-rv-list-title {
        font-size: 0.875em;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0;
    }

    .uws-rv-list-back {
        flex-basis: 100%;
        justify-content: center;
    }

    .uws-rv-list-back>svg {
        width: 1rem;
        height: auto;
    }

    .uws-rv-list-items {
        gap: 1.15em;
        padding: 0 1em;
    }

    .uws-rv-list-item {
        gap: 0.75em;
        padding: 0.375em;
    }

    /* Smaller thumbnail */
    .uws-rv-item-thumbnail {
        width: 5em;
        flex-basis: auto;
    }

    .uws-rv-item-name {
        font-size: 0.875em;
    }

    .uws-rv-item-capacity {
        padding: 0.125em 0.375em;
    }

    .uws-rv-item-capacity span {
        font-size: 0.75em;
    }

    .uws-rv-item-descr {
        font-size: 0.75em;
        line-height: normal;
    }

    .uws-rv-item-paynow,
    .uws-rv-item-dailyrate {
        font-size: 0.75em;
    }

    .uws-rv-item-paynow strong,
    .uws-rv-item-dailyrate strong {
        font-size: 1em;
    }

    .uws-rv-item-pricing-note {
        font-size: 0.625em;
    }

    .uws-rv-select-btn {
        width: 2.5em;
        height: 2.5em;
        display: none;
    }

    body .uws-map-stage {
        padding-bottom: 0;
    }

    .uws-rv-item-info {
        gap: 0.25em;
    }

    .uws-rv-item-pricing {
        align-items: center;
        gap: 0.75em;
    }

    .uws-rv-map-back-btn {
        padding: 0;
    }

    .uws-rv-map-back-btn svg,
    .uws-rv-map-filter-btn svg {
        width: 0.875em;
        height: 0.875em;
    }

    .uws-rv-searchpill-text>.uws-rv-sep {
        display: none;
    }

    .uws-rv-guestsinfo {
        flex-basis: 100%;
    }

    .uws-rv-map-area .uws-map-graph svg {
        min-height: 58dvh;
    }

    .uws-rv-item-content {
        padding: 0;
        flex-basis: 62%;
    }
}

/* --- Desktop XL (≥1280px): side-by-side grid layout --- */
@media (min-width: 1280px) {
    #uws-rv-map-pop .uws-pop-box {
        max-width: min(87.5em, 95vw);
        max-height: 90vh;
        overflow: hidden;
    }

    .uws-rv-map-popup {
        display: grid;
        grid-template-areas:
            "topbar topbar"
            "map    list";
        grid-template-columns: 1fr 42.5em;
        grid-template-rows: auto 1fr;
        height: 100dvh;
        overflow: hidden;
    }

    .uws-rv-map-topbar {
        grid-area: topbar;
    }

    .uws-rv-map-section {
        grid-area: map;
        overflow: hidden;
    }

    .uws-rv-list-section {
        grid-area: list;
        overflow-y: auto;
        padding: 2em 2.5em;
        border-left: 1px solid #e0e0e0;
    }

    .uws-rv-item-paynow,
    .uws-rv-item-dailyrate>span:first-child,
    .uws-rv-item-info-btn,
    .uws-rv-item-pricing-note {
        display: none;
    }

    .uws-rv-item-dailyrate>strong::after {
        content: "/night";
    }

    .uws-rv-item-paynow,
    .uws-rv-item-dailyrate {
        font-size: 1.5rem;
    }

    .uws-rv-list-title {
        text-align: left;
        justify-content: flex-start;
    }

    .uws-rv-item-header-cont {
        gap: .45em;
    }
}