/* ── CSS variables ───────────────────────────────────── */
:root {
    --ld-teal:       #299CDB;
    --ld-brand-teal: #299CDB;
    --ld-navy:       #0F2137;
}

/* Expert card avatar */
.ld-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
}
.ld-avatar img { width: 100%; height: 100%; object-fit: cover; }

#modal-wrapper {
    display: none;
    color: #0D324D;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: block;
    justify-content: center;
    z-index: 1040;
}

.modal-content-wrapper {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1000px;
    height: 100vh;
    background-color: #ffffff;
    overflow-y: auto;
    z-index: 1050;
    margin: 0 auto;
    display: block;
    padding-bottom: 1rem;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #dcdcdc;
    overflow: hidden;
}

/* ── Ad title row ───────────────────────────────────── */
.ld-ad-title-row {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.ld-ad-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ld-navy);
    margin: 0 0 4px;
    line-height: 1.3;
}

.ld-ad-address {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.ld-ad-address i {
    color: var(--ld-teal);
    margin-right: 4px;
}

/* ── Price & Actions row ─────────────────────────────── */
.ld-modal-price-row {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.ld-ad-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ld-navy);
    letter-spacing: -0.02em;
}

.ld-action-btn {
    height: 36px;
    padding: 0 12px;
    background-color: transparent;
    border: 1px solid var(--ld-teal);
    border-radius: 6px;
    color: var(--ld-teal);
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.ld-action-btn:hover {
    background-color: rgba(27, 132, 161, .08);
}

/* ── Modal body ──────────────────────────────────────── */
.ld-modal-body {
    padding: 1rem 1rem 0;
}

/* ── Details table ───────────────────────────────────── */
.ld-detail-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #ffffff;
    table-layout: fixed;
}

.ld-detail-table td {
    font-size: 14px;
    padding: 12px 14px;
    height: 50px;
    box-sizing: border-box;
    box-shadow: 0 1px 0 0 #e2e8f0, 1px 0 0 0 #e2e8f0;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ld-detail-table tr:last-child td { box-shadow: 1px 0 0 0 #e2e8f0; }
.ld-detail-table tr td:last-child { box-shadow: 0 1px 0 0 #e2e8f0; }
.ld-detail-table tr:last-child td:last-child { box-shadow: none; }

.ld-table-icon { vertical-align: middle; margin: 0 10px 0 7px; width: 22px; height: 22px; }

/* ── Link buttons ────────────────────────────────────── */
.ld-link-btn {
    height: 32px;
    line-height: 32px;
    padding: 0 15px;
    background-color: transparent;
    border: 1px solid var(--ld-teal);
    border-radius: 6px;
    color: var(--ld-teal);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    display: inline-block;
}

.ld-link-btn:hover {
    background-color: rgba(27, 132, 161, .08);
    color: var(--ld-teal);
}

/* ── Section headings ────────────────────────────────── */
.ld-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ld-navy);
    margin: 0 0 12px 0;
}

/* ── Close button ────────────────────────────────────── */
.close-btn {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    z-index: 1051;
    background-color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.close-btn::after {
    content: '×';
    font-size: 30px;
    color: #000;
    line-height: 1;
}

/* ── Swiper carousel ─────────────────────────────────── */
.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    height: 400px;
    width: 100%;
    flex-shrink: 0;
}

.swiper-slide img {
    height: 400px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.carousel-container .swiper-button-next,
.carousel-container .swiper-button-prev {
    display: flex !important;
    color: #000000 !important;
    background: rgba(255, 255, 255, 0.8) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    margin-top: -22px !important;
}

.carousel-container .swiper-button-next:after,
.carousel-container .swiper-button-prev:after {
    font-size: 20px !important;
    color: rgba(0, 0, 0, 0.6) !important;
}

.swiper-button-disabled {
    opacity: 0.3 !important;
    pointer-events: none !important;
}

.swiper-wrapper, .swiper-slide {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* ── Mobile ──────────────────────────────────────────── */
@media screen and (max-width: 768px) {
    .modal-content-wrapper {
        width: 100%;
    }
}

/* ── Elements outside modal, related to it ───────────── */
.view-details-button {
    margin-left: 3px;
    height: 32px;
    line-height: 32px;
    padding: 0 15px;
    background-color: transparent;
    border: 1px solid var(--ld-teal);
    border-radius: 4px;
    color: var(--ld-teal);
    text-align: center;
    text-decoration: none;
    font-size: 13px;
}

.gridjs-td {
    position: relative !important;
}

.price-header {
    margin-top: 16px;
}

@media (max-width: 768px) {
    .price-header {
        margin-top: 48px;
    }
}

/* ── POI markers ─────────────────────────────────────── */
.poi-marker { background: transparent; border: none; }

.poi-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-size: 14px;
}

.poi-transport .poi-icon { background-color: #007bff; color: white; }
.poi-school .poi-icon { background-color: #28a745; color: white; }
.poi-shop .poi-icon { background-color: #ffc107; color: #333; }
