/* ==========================================================================
   1. FRONTEND FILTER FORM STYLES
   ========================================================================== */
.dple-filter-form-ui {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    background: #f8fafc;
    padding: 24px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.dple-filter-group {
    flex: 1;
}

.dple-filter-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dple-filter-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    font-size: 16px;
    color: #334155;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.dple-filter-group select:focus {
    outline: none;
    border-color: #7c12de;
    box-shadow: 0 0 0 3px rgba(124, 18, 222, 0.1);
}

/* ==========================================================================
   2. ARCHIVE GRID & LAYOUT CARD INTERFACE RULES
   ========================================================================== */
.dple-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 25px 0;
    width: 100%;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}

.dple-property-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.dple-property-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.dple-card-image {
    height: 230px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    background-color: #f1f5f9;
}

.dple-card-details {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
}

.dple-card-details h3 {
    margin: 0 0 8px 0 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    line-height: 1.3 !important;
}

.dple-card-price {
    font-size: 24px;
    font-weight: 800;
    color: #7c12de;
    margin: 0 0 12px 0;
}

.dple-card-features {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 24px 0;
}

.dple-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.75px;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.15);
    z-index: 3;
}
.badge-available { background-color: #10b981; }
.badge-rented { background-color: #3b82f6; }
.badge-off-market { background-color: #64748b; }
.badge-sold { background-color: #ef4444; }

.dple-quickview-trigger {
    background-color: #7c12de;
    color: #ffffff !important;
    border: none;
    padding: 13px 24px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    margin-top: auto;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.dple-quickview-trigger:hover {
    background-color: #5b0ba5;
}

/* ==========================================================================
   3. SECURITY MODAL MASK CONTAINMENTS
   ========================================================================== */
#dple-quickview-modal-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 99999999 !important; 
    display: flex; align-items: center; justify-content: center;
    box-sizing: border-box;
}

.dple-modal-backdrop {
    position: absolute; width: 100%; height: 100%;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px); 
}

.dple-modal-window {
    position: relative; background: #ffffff;
    width: 92%; max-width: 950px; height: 85vh; max-height: 640px;
    border-radius: 16px; z-index: 5; overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    animation: dpleScaleRevealAnimation 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dple-modal-close-btn {
    position: absolute; top: 20px; right: 20px;
    background: #ffffff; border: 1px solid #e2e8f0;
    font-size: 28px; line-height: 1; cursor: pointer; color: #475569;
    z-index: 12; border-radius: 50%; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
}

/* ==========================================================================
   4. INTERNAL DYNAMIC DATA RENDERING
   ========================================================================== */
.dple-modal-flex-layout { display: flex; height: 100%; width: 100%; }

.dple-modal-graphicbox {
    flex: 1.2; background-size: cover; background-position: center;
    background-color: #f8fafc; position: relative; display: flex;
    align-items: center; justify-content: center;
}

.dple-modal-infobox {
    flex: 0.8; padding: 44px; overflow-y: auto;
    display: flex; flex-direction: column; box-sizing: border-box;
}

.dple-modal-infobox h2 {
    margin: 0 0 16px 0 !important; font-size: 32px !important;
    font-weight: 800 !important; line-height: 1.2 !important; color: #0f172a !important;
}

.dple-modal-meta-row { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.dple-modal-meta-row .dple-badge { position: static !important; }
.dple-modal-price { font-size: 30px; font-weight: 800; color: #7c12de; }
.dple-modal-infobox hr { border: 0; height: 1px; background: #e2e8f0; margin: 24px 0; width: 100%; }

/* ==========================================================================
   5. SPINNERS & ANIMATIONS
   ========================================================================== */
.dple-loading-spinner-container {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 100%; width: 100%; gap: 18px;
}

.dple-spinner {
    width: 52px; height: 52px; border: 4px solid #f1f5f9;
    border-top: 4px solid #7c12de; border-radius: 50%;
    animation: dpleSpiningEngineLogicLoop 0.8s linear infinite;
}

@keyframes dpleScaleRevealAnimation {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes dpleSpiningEngineLogicLoop {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   6. RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 820px) {
    .dple-filter-form-ui { flex-direction: column; gap: 15px; }
    .dple-modal-window { height: 90vh; max-height: none; width: 94%; }
    .dple-modal-flex-layout { flex-direction: column; }
    .dple-modal-graphicbox { height: 240px; flex: none; }
    .dple-modal-infobox { flex: 1; padding: 32px; }
}