/**
 * Dokan Real Estate – Frontend Styles
 */

/* ── Property card grid ────────────────────────────────────────────────────── */
.dre-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.dre-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: box-shadow .2s, transform .2s;
}
.dre-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    transform: translateY(-2px);
}

.dre-card-img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
}
.dre-card-img-wrap img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.dre-card:hover .dre-card-img-wrap img {
    transform: scale(1.04);
}

/* Taxonomy badges */
.dre-badge {
    position: absolute;
    top: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .5px;
    color: #fff;
}
.dre-badge-status { left: 12px;  background: #0073aa; }
.dre-badge-type   { right: 12px; background: rgba(0,0,0,.55); }

/* Card body */
.dre-card-body { padding: 16px; }

.dre-card-title {
    margin: 0 0 6px;
    font-size: 16px;
}
.dre-card-title a {
    text-decoration: none;
    color: #1a1a1a;
}
.dre-card-title a:hover { color: #0073aa; }

.dre-card-address {
    margin: 0 0 10px;
    color: #777;
    font-size: 13px;
}

.dre-card-price {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
    color: #0073aa;
}
.dre-card-price small {
    font-size: 13px;
    font-weight: 400;
    color: #888;
}

.dre-card-specs {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #555;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

/* ── Search form ────────────────────────────────────────────────────────────── */
.dre-search-form {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #eee;
    margin-bottom: 32px;
}
.dre-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}
.dre-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: #444;
}
.dre-field input,
.dre-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
}
.dre-field input:focus,
.dre-field select:focus {
    border-color: #0073aa;
    outline: none;
}

.dre-search-actions {
    margin-top: 20px;
    text-align: center;
}
.dre-clear-link {
    margin-left: 12px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}
.dre-clear-link:hover { color: #0073aa; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.dre-btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .15s, opacity .15s;
}
.dre-btn-primary   { background: #0073aa; color: #fff; }
.dre-btn-primary:hover { background: #005f8d; color: #fff; }
.dre-btn-secondary { background: #6c757d; color: #fff; }
.dre-btn-secondary:hover { opacity: .85; }

/* ── Enquiry form ───────────────────────────────────────────────────────────── */
.dre-enquiry-form {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #eee;
}
.dre-enquiry-form h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
}
.dre-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color .15s;
}
.dre-input:focus { border-color: #0073aa; outline: none; }
.dre-success { color: #2a7d2a; font-weight: 600; font-size: 16px; padding: 12px 0; }

/* ── Pagination ─────────────────────────────────────────────────────────────── */
.dre-pagination { margin-top: 40px; text-align: center; }
.dre-pagination .page-numbers {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0 3px;
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
}
.dre-pagination .page-numbers.current { background: #0073aa; color: #fff; border-color: #0073aa; }
.dre-pagination .page-numbers:hover   { background: #f0f0f0; }

/* ── No results ─────────────────────────────────────────────────────────────── */
.dre-no-results { padding: 20px; background: #f9f9f9; border-radius: 8px; color: #666; }
.dre-no-results-block {
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
    color: #666;
    font-size: 17px;
}
.dre-results-header { margin-top: 30px; margin-bottom: 20px; }

/* ── Map shortcode ──────────────────────────────────────────────────────────── */
.dre-map-wrap { max-width: 1400px; margin: 0 auto; padding: 20px; }

.dre-map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    background: #f8f9fa;
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.dre-map-geocoder { flex: 1; min-width: 280px; }
.dre-map-input,
.dre-map-select {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    height: 44px;
    min-width: 160px;
    background: #fff;
}

.dre-map-body {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.dre-map-canvas { flex: 2; min-width: 500px; }
#properties-map { height: 620px; border-radius: 12px; border: 1px solid #ddd; }

.dre-map-list { flex: 1; min-width: 360px; max-width: 460px; }
#properties-list { max-height: 620px; overflow-y: auto; padding-right: 6px; }

.dre-map-card {
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 14px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow .15s;
}
.dre-map-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.dre-map-card img  { width: 100%; height: 150px; object-fit: cover; display: block; }
.dre-map-card-body { padding: 12px; }
.dre-map-card h4   { margin: 0 0 6px; font-size: 15px; }
.dre-map-card p    { margin: 0 0 6px; font-size: 13px; color: #666; }
.dre-map-price     { font-size: 17px !important; font-weight: 700; color: #0073aa !important; }

/* Map marker */
.dre-map-marker {
    width: 26px;
    height: 26px;
    background: #0073aa;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,.35);
    cursor: pointer;
    transition: transform .15s;
}
.dre-map-marker:hover { transform: scale(1.2); }

/* Map popup */
.dre-map-popup img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; margin-bottom: 10px; }
.dre-map-popup h4  { margin: 0 0 6px; font-size: 15px; }
.dre-map-popup p   { margin: 0 0 8px; font-size: 13px; color: #555; }
.dre-map-popup .dre-btn { display: block; text-align: center; margin-top: 10px; }

/* ── Single property template ───────────────────────────────────────────────── */
.dre-single-property { max-width: 1200px; margin: 40px auto; padding: 0 20px; }

.dre-hero-image { position:relative; margin-bottom:35px; border-radius:12px; overflow:hidden; box-shadow:0 4px 20px rgba(0,0,0,.08); }
.dre-hero-image img { width:100%; height:auto; display:block; }
.dre-price-badge { position:absolute; top:20px; right:20px; background:rgba(0,115,170,.95); color:#fff; padding:12px 24px; border-radius:8px; font-size:26px; font-weight:700; box-shadow:0 4px 12px rgba(0,0,0,.3); }
.dre-price-badge small { font-size:16px; opacity:.9; }
.dre-address-line { font-size:18px; color:#555; margin-bottom:20px; }
.dre-section-box { background:#f8f9fa; padding:28px; border-radius:12px; margin-bottom:45px; }
.dre-section-box h2 { margin-top:0; font-size:20px; }
.dre-specs-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:18px; font-size:16px; }
.dre-spec strong { display:block; font-weight:600; color:#444; margin-bottom:2px; }
.dre-badges-wrap { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:35px; }
.dre-location-box { background:#f8f9fa; padding:24px 28px; border-radius:12px; margin-bottom:40px; }
.dre-location-box h2 { margin:0 0 18px 0; font-size:20px; }
.dre-location-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:16px 40px; font-size:16px; }
.dre-whatsapp-wrap { text-align:center; margin:50px 0 40px; }
.dre-whatsapp-btn { background:#25D366; color:#fff; font-size:18px; padding:16px 50px; border-radius:8px; text-decoration:none; display:inline-flex; align-items:center; gap:10px; }
.dre-whatsapp-btn:hover { background:#1da853; color:#fff; }
.dre-whatsapp-note { margin-top:10px; color:#555; font-size:14px; }
.dre-enquiry-btn-wrap { text-align:center; margin:40px 0 60px; }
.dre-enquiry-btn { font-size:18px; padding:16px 52px; }
.dre-map-section { margin:60px 0 50px; }
.dre-map-section h2 { margin-bottom:20px; }
.dre-single-map { height:420px; border-radius:12px; border:1px solid #ddd; }
.dre-property-title { margin-bottom:8px; }
.dre-enquiry-container { display:none; margin-bottom:80px; }

@media (max-width: 768px) {
    .dre-listings-grid  { grid-template-columns: 1fr; }
    .dre-search-grid    { grid-template-columns: 1fr; }
    .dre-map-body       { flex-direction: column; }
    .dre-map-canvas,
    .dre-map-list       { min-width: 100%; max-width: 100%; }
    .dre-map-filters    { gap: 10px; }
}

/* ── Vendor form address autocomplete dropdown ──────────────────────────────── */
.dre-ac-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 220px;
    overflow-y: auto;
}
.dre-ac-item {
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
}
.dre-ac-item:last-child { border-bottom: none; }
.dre-ac-item:hover { background: #f0f7ff; color: #0073aa; }

/* ── Claim Property ─────────────────────────────────────────────────────────── */
.dre-claim-wrap { margin: 30px 0; text-align: center; }
.dre-claim-btn { border: 2px solid #0073aa; background: transparent; color: #0073aa; }
.dre-claim-btn:hover { background: #0073aa; color: #fff; }
.dre-claim-badge { display: inline-block; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.dre-claim-badge-verified { background: #dff0d8; color: #3c763d; border: 1px solid #d6e9c6; }

.dre-claim-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999; align-items: center; justify-content: center; }
.dre-claim-modal-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); }
.dre-claim-modal-content { position: relative; background: #fff; border-radius: 12px; padding: 32px; max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
.dre-claim-modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; cursor: pointer; color: #999; line-height: 1; }
.dre-claim-modal-close:hover { color: #333; }
.dre-claim-modal-content h3 { margin: 0 0 8px; font-size: 22px; }
.dre-claim-modal-desc { color: #666; font-size: 14px; margin-bottom: 20px; }
.dre-claim-field { margin-bottom: 14px; }
.dre-claim-field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; color: #444; }
.dre-claim-input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; box-sizing: border-box; }
.dre-claim-input:focus { border-color: #0073aa; outline: none; }
.dre-claim-feedback { margin-top: 12px; padding: 10px 14px; border-radius: 6px; font-size: 14px; font-weight: 600; }
.dre-claim-success { background: #dff0d8; color: #3c763d; border: 1px solid #d6e9c6; }
.dre-claim-error { background: #f2dede; color: #a94442; border: 1px solid #ebccd1; }

/* ── BuddyPress Properties ──────────────────────────────────────────────────── */
.dre-bp-properties-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dre-bp-properties-header h2 { margin: 0; }
