/* =========================================================
   FILTERS + TABLE
========================================================= */

.dp-filters {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.dp-status-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dp-filter-button {
    padding: 10px 18px;
    border: 1px solid #8ebc19;
    border-radius: 30px;
    background: transparent;
    color: #03533b;
    font: inherit;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.dp-filter-button:hover,
.dp-filter-button.is-active {
    background: #8ebc19;
    color: #fff;
}

.dp-rooms-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.dp-rooms-filter label {
    margin: 0;
    color: #03533b;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dp-rooms-filter select {
    min-width: 180px;
    height: 42px;
    padding: 0 38px 0 14px;
    border: 1px solid #8ebc19;
    border-radius: 30px;
    background: #fff;
    color: #03533b;
    font: inherit;
    cursor: pointer;
}

.developer-properties-table-wrapper {
    overflow-x: auto;
}

.developer-properties-table {
    width: 100%;
    border-collapse: collapse;
}

.developer-properties-table th,
.developer-properties-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.property-status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
}

.property-status-available .property-status-badge {
    background: #e7f5ea;
    color: #28753a;
}

.property-status-reserved .property-status-badge {
    background: #fff3d9;
    color: #9a6500;
}

.property-status-sold .property-status-badge {
    background: #ececec;
    color: #666;
}


/* =========================================================
   PROPERTY PARAMETERS
========================================================= */

.dp-property-parameter-table {
    width: 100%;
}

.dp-property-parameter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 48px;
    border-bottom: 1px solid rgba(3, 83, 59, 0.12);
}

.dp-property-parameter-label,
.dp-property-parameter-value {
    display: flex;
    align-items: center;
    padding: 12px 18px;
}

.dp-property-parameter-label {
    justify-content: center;
    border-right: 1px solid rgba(3, 83, 59, 0.08);
    font-weight: 600;
}

.dp-property-parameter-value {
    justify-content: center;
}

.dp-property-status-dot {
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #999;
}

.dp-parameter-status-available .dp-property-status-dot {
    background: #8ebc19;
}

.dp-parameter-status-reserved .dp-property-status-dot {
    background: #d8a93b;
}

.dp-parameter-status-sold .dp-property-status-dot {
    background: #8a8a8a;
}


/* =========================================================
   FLOORPLAN
========================================================= */

.dp-property-floorplans {
    width: 100%;
}

.dp-property-floorplan-item {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid #8ebc19;
    border-radius: 12px;
    background: #fff;
}

.dp-property-floorplan-image {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.25s ease;
}

.dp-property-floorplan-item:hover .dp-property-floorplan-image {
    transform: scale(1.02);
}

.dp-property-floorplan-label {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 9px 14px;
    border-radius: 30px;
    background: rgba(3, 83, 59, 0.92);
    color: #fff;
    font-size: 13px;
    line-height: 1;
}


/* =========================================================
   MAP WRAPPER + TOOLBAR
========================================================= */

.dp-map {
    position: relative;
    width: 100%;
    overflow: visible;
}

.dp-map-toolbar {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.dp-map-title {
    margin: 0;
    color: #03533b;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.05;
}


.dp-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-left: auto;
    font-size: 13px;
}

.dp-map-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dp-map-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.dp-map-legend .is-available {
    background: #8ebc19;
}

.dp-map-legend .is-reserved {
    background: #d8a53e;
}

.dp-map-legend .is-sold {
    background: #858585;
}


/* =========================================================
   MAP STAGE
========================================================= */

.dp-map-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: visible;
    background: transparent;
}

/*
 * Samotný obrázok ostáva zaoblený.
 * Stage má overflow:visible, aby tooltip nebol odrezaný.
 */
.dp-map-background {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    user-select: none;
    pointer-events: none;
}

/*
 * Jemný vizuálny okraj kopírujúci zaoblenie obrázka.
 */
.dp-map-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(3, 83, 59, 0.08);
    pointer-events: none;
}


/* =========================================================
   MAP AREAS — COMMON
========================================================= */

.dp-map-property-area {
    position: absolute;
    z-index: 2;
    display: block;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    overflow: visible;
}

.dp-map-property-shape {
    position: absolute;
    inset: 0;
    display: block;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;

    transition:
        background-color 0.25s ease,
        filter 0.25s ease,
        transform 0.25s ease,
        opacity 0.25s ease;
}


/* =========================================================
   MAP — PROPERTY AREAS
========================================================= */

.dp-map-property-shape {
    background: rgba(142, 188, 25, 0.62);
}

.dp-map-property-area.status-available .dp-map-property-shape {
    background: rgba(84, 165, 83, 0.55);
}

.dp-map-property-area.status-reserved .dp-map-property-shape {
    background: rgba(216, 165, 62, 0.62);
}

.dp-map-property-area.status-sold .dp-map-property-shape {
    background: rgba(100, 100, 100, 0.62);
}

.dp-map-property-area:hover,
.dp-map-property-area:focus,
.dp-map-property-area:focus-visible {
    z-index: 100;
}

.dp-map-property-area:hover .dp-map-property-shape,
.dp-map-property-area:focus .dp-map-property-shape {
    filter: drop-shadow(0 8px 9px rgba(0, 0, 0, 0.35));
    transform: translateY(-3px);
}


/* =========================================================
   MAP TOOLTIP
========================================================= */

/*
 * Tooltip zostáva vo vnútri klikateľnej oblasti.
 * Tým sa minimalizuje riziko orezania nadradeným kontajnerom.
 */
.dp-map-tooltip {
    position: absolute;
    z-index: 999;
    left: 50%;
    top: 24px;
    bottom: auto;

    width: 230px;
    max-width: calc(100vw - 40px);
    padding: 15px;

    border-radius: 10px;
    background: rgba(3, 83, 59, 0.97);
    color: #fff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translate(-50%, 8px);

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;
}

.dp-map-property-area:hover .dp-map-tooltip,
.dp-map-property-area:focus .dp-map-tooltip,
.dp-map-property-area:focus-visible .dp-map-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.dp-map-tooltip strong,
.dp-map-tooltip small,
.dp-map-tooltip b,
.dp-map-tooltip em {
    display: block;
}

.dp-map-tooltip strong {
    margin-bottom: 5px;
    color: #fff;
    font-size: 17px;
    line-height: 1.25;
}

.dp-map-tooltip small {
    margin-bottom: 10px;
    color: #8ebc19;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.dp-map-tooltip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.dp-map-tooltip b {
    margin-bottom: 10px;
    color: #fff;
    font-size: 18px;
}

.dp-map-tooltip em {
    color: #8ebc19;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 767px) {
    .dp-filters {
        align-items: stretch;
    }

    .dp-status-filters,
    .dp-rooms-filter,
    .dp-rooms-filter select {
        width: 100%;
    }

    .dp-filter-button {
        flex: 1 1 auto;
    }

    .dp-map-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .dp-map-legend {
        margin-left: 0;
    }

    .dp-map-tooltip {
        display: none;
    }

}

@media (max-width: 600px) {
    .dp-property-parameter-row {
        grid-template-columns: 1fr;
    }

    .dp-property-parameter-label {
        justify-content: flex-start;
        border-right: 0;
        padding-bottom: 4px;
    }

    .dp-property-parameter-value {
        justify-content: flex-start;
        padding-top: 4px;
    }
}

.dp-map{
    width:100%;
    max-width:1500px;
    margin:0 auto;
}

.dp-map-property-area {
    z-index: 2;
}

.dp-map-property-area.is-hovered {
    z-index: 200 !important;
}

.dp-map-property-area:not(.is-hovered) .dp-map-tooltip {
    opacity: 0;
    visibility: hidden;
}

.developer-properties-table tbody .property-row {
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.developer-properties-table tbody .property-row:hover {
    background: rgba(142, 188, 25, 0.10);
}

.developer-properties-table tbody .property-row:focus {
    outline: 2px solid #8ebc19;
    outline-offset: -2px;
}

.dp-property-table-link {
    color: inherit;
    text-decoration: none;
}

.dp-property-table-name {
    color: #03533b;
    font-weight: 700;
}

.property-row:hover .dp-property-table-name {
    color: #8ebc19;
}

@media (max-width: 900px) {
    .developer-properties-table {
        min-width: 980px;
    }
}

/* Výraznejší hover konkrétnych nehnuteľností */

.dp-map-property-shape {
    opacity: 0.72;
}

.dp-map-property-area.status-available.is-hovered
.dp-map-property-shape,
.dp-map-property-area.status-available:hover
.dp-map-property-shape {
    background: rgba(69, 177, 73, 0.88);
}

.dp-map-property-area.status-reserved.is-hovered
.dp-map-property-shape,
.dp-map-property-area.status-reserved:hover
.dp-map-property-shape {
    background: rgba(226, 164, 36, 0.9);
}

.dp-map-property-area.status-sold.is-hovered
.dp-map-property-shape,
.dp-map-property-area.status-sold:hover
.dp-map-property-shape {
    background: rgba(105, 105, 105, 0.88);
}

.dp-map-property-area.is-hovered .dp-map-property-shape,
.dp-map-property-area:hover .dp-map-property-shape {
    opacity: 1;
    filter:
        brightness(1.08)
        drop-shadow(0 10px 14px rgba(0, 0, 0, 0.38));
    transform: translateY(-3px) scale(1.015);
}
/* =========================================================
   FINAL MAP INTERACTION OVERRIDES
========================================================= */

/* Konkrétne chalety nemajú trvalé farebné prekrytie podľa stavu. */
.dp-map-property-area .dp-map-property-shape,
.dp-map-property-area.status-available .dp-map-property-shape,
.dp-map-property-area.status-reserved .dp-map-property-shape,
.dp-map-property-area.status-sold .dp-map-property-shape {
    background: rgba(3, 83, 59, 0.42);
    opacity: 0;
    filter: none;
    transform: none;
}

/* Hover je rovnaký bez ohľadu na stav nehnuteľnosti. */
.dp-map-property-area.is-hovered .dp-map-property-shape,
.dp-map-property-area:hover .dp-map-property-shape,
.dp-map-property-area:focus .dp-map-property-shape {
    background: rgba(142, 188, 25, 0.62);
    opacity: 1;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
    transform: scale(1.015);
}

/* Staré tooltipy vložené do SVG boxu sa už nepoužívajú. */
.dp-map-property-area .dp-map-tooltip {
    display: none !important;
}

/* Jeden spoločný plávajúci tooltip, ktorý nemôže orezať Betheme. */
.dp-map-floating-tooltip {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 230px;
    max-width: calc(100vw - 24px);
    padding: 15px;
    border-radius: 10px;
    background: rgba(3, 83, 59, 0.97);
    color: #fff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.16s ease, visibility 0.16s ease, transform 0.16s ease;
}

.dp-map-floating-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dp-map-floating-tooltip strong,
.dp-map-floating-tooltip b,
.dp-map-floating-tooltip em {
    display: block;
}

.dp-map-floating-tooltip strong {
    margin-bottom: 7px;
    color: #fff;
    font-size: 17px;
    line-height: 1.25;
}

.dp-map-tooltip-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.dp-map-status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #8a8a8a;
}

.dp-map-status-dot.status-available {
    background: #8ebc19;
}

.dp-map-status-dot.status-reserved {
    background: #d8a53e;
}

.dp-map-status-dot.status-sold {
    background: #d45b5b;
}

.dp-map-status-dot.status-unknown {
    background: #8a8a8a;
}

.dp-map-floating-tooltip .dp-map-tooltip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.dp-map-floating-tooltip b {
    margin-bottom: 10px;
    color: #fff;
    font-size: 18px;
}

.dp-map-floating-tooltip em {
    color: #8ebc19;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
}

/* Prepojenie hoveru medzi mapou a cenníkom. */
.developer-properties-table tbody .property-row.is-map-linked-hover,
.developer-properties-table tbody .property-row:hover {
    background: rgba(142, 188, 25, 0.12);
}

.developer-properties-table tbody .property-row.is-map-linked-hover .dp-property-table-name,
.developer-properties-table tbody .property-row:hover .dp-property-table-name {
    color: #8ebc19;
}

@media (max-width: 767px) {
    .dp-map-floating-tooltip {
        display: none !important;
    }
}


/* Cena v cenníku smeruje priamo na kontaktný formulár detailu. */
.dp-property-table-price {
    color: inherit;
    font-weight: 500;
    text-decoration: none;
}

.dp-property-table-price:hover,
.dp-property-table-price:focus {
    color: #8ebc19;
    text-decoration: underline;
    text-underline-offset: 3px;
}


/* Price link in property parameter shortcode */
.dp-property-parameter-price-link {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(142, 188, 25, 0.62);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.dp-property-parameter-price-link:hover,
.dp-property-parameter-price-link:focus {
    color: #8ebc19;
    border-bottom-color: #8ebc19;
}


/* =========================================================
   SINGLE-LEVEL MAP + NEW BRAND COLORS
========================================================= */
.dp-map-property-area .dp-map-property-shape,
.dp-map-property-area.status-available .dp-map-property-shape,
.dp-map-property-area.status-reserved .dp-map-property-shape,
.dp-map-property-area.status-sold .dp-map-property-shape {
    background: rgba(3, 83, 59, 0.42);
    opacity: 0;
    filter: none;
    transform: none;
}

.dp-map-property-area.is-hovered .dp-map-property-shape,
.dp-map-property-area:hover .dp-map-property-shape,
.dp-map-property-area:focus .dp-map-property-shape {
    background: rgba(142, 188, 25, 0.68);
    opacity: 1;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.30));
    transform: scale(1.015);
}
