/* assets/css/vayura-extra.css - Premium Property Styling & Alignment (V2) */

/* Enforce Uniform Card Heights & Architecture */
.property-single-boxarea {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 480px; /* Standardize card minimum height - adjusted for mobile */
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 30px; /* Ensure spacing between rows on mobile */
}

.property-single-boxarea:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    border-color: rgba(237, 132, 56, 0.2);
}

/* Force Cinematic 16:9 Aspect Ratio for ALL Images */
.property-single-boxarea .img1 {
    position: relative;
    width: 100%;
    height: 230px !important; /* FIXED height to prevent uneven boxes */
    background: #f8f8f8;
    overflow: hidden;
    cursor: pointer;
}

.property-single-boxarea .img1 img {
    width: 100%;
    height: 100%;
    object-fit: cover !important; /* Ensure photos fill the frame without stretching */
    transition: transform 0.6s ease;
}

.property-single-boxarea:hover .img1 img {
    transform: scale(1.08);
}

/* Content Area Alignment - Standardize Heights */
.property-single-boxarea .content-area {
    padding: 24px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.property-single-boxarea .content-area .head {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Max 2 lines for title to keep boxes level */
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 52px; /* Fixed height for title block */
    line-height: 1.3;
}

.property-single-boxarea .content-area > p {
    font-size: 14px;
    color: #666;
    margin-top: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Max 1 line for address */
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 20px; /* Fixed height for address block */
}

/* Bottom Actions - Aligned at the very base */
.property-single-boxarea .btn-area {
    margin-top: auto !important; /* PUSHES this section to the bottom of the card */
    padding-top: 20px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.property-single-boxarea .nm-btn a {
    background: #fef0e6 !important;
    color: #ED8438 !important;
    font-weight: 800 !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
}

/* Social & Love Logic Styling */
.love-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.love-share a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f8f8;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.love-share a.heart:hover { background: #fff1f1; border-color: #ffc2c2; }
.love-share a.heart.liked svg, .love-share a.heart.liked svg path { fill: #ED8438 !important; }
.love-share a.share:hover { background: #f0f7ff; border-color: #c2dfff; }

/* Lightbox Premium Glassmorphism */
.vayura-lightbox {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.4s;
}

.vayura-lightbox.active { opacity: 1; pointer-events: auto; }

.vlb-content {
    max-width: 90%; max-height: 80vh; position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: #000;
}

.vlb-main { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 4px; }

/* Lightbox Navigation */
.vlb-nav {
    position: absolute; top: 50%; width: 60px; height: 60px;
    background: rgba(255,255,255,0.1); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2); border-radius: 50%;
    color: white; font-size: 24px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transform: translateY(-50%); transition: all 0.3s;
    z-index: 100;
}

.vlb-nav:hover { background: #ED8438; border-color: #ED8438; transform: translateY(-50%) scale(1.1); }
.v-lb-prev { left: -80px; }
.v-lb-next { right: -80px; }

@media (max-width: 1200px) {
    .v-lb-prev { left: 20px; }
    .v-lb-next { right: 20px; }
}

.vlb-close {
    position: absolute; top: 30px; right: 30px;
    font-size: 40px; color: white; cursor: pointer;
    z-index: 101; transition: transform 0.3s;
}
.vlb-close:hover { transform: rotate(90deg) scale(1.2); color: #ED8438; }

/* Lightbox Footer & Thumbs */
.vlb-footer {
    position: absolute; bottom: 30px; left: 0; width: 100%;
    display: flex; flex-direction: column; align-items: center; gap: 20px;
}

.vlb-counter {
    color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 600;
    background: rgba(0,0,0,0.5); padding: 5px 15px; border-radius: 20px;
}

.vlb-thumbs {
    display: flex; gap: 10px; padding: 10px;
    background: rgba(255,255,255,0.05); border-radius: 12px;
}

.vlb-thumb {
    width: 60px; height: 45px; object-fit: cover; border-radius: 6px;
    cursor: pointer; opacity: 0.5; transition: all 0.3s;
    border: 2px solid transparent;
}

.vlb-thumb:hover { opacity: 0.8; }
.vlb-thumb.active { opacity: 1; border-color: #ED8438; transform: scale(1.1); }

/* Searchable Select - Premium Overrides & Positioning Fixes */
.vayura-searchable-select {
    position: relative;
    width: 100%;
    z-index: 105; /* High enough to stay above generic content */
}

.vayura-searchable-select .vss-display {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 14px 20px !important;
    font-weight: 600 !important;
    color: #333 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02) !important;
    cursor: pointer;
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vayura-searchable-select.active {
    z-index: 1000 !important; /* Force active select to top of stack */
}

.vayura-searchable-select.active .vss-display {
    border-color: #ED8438 !important;
    box-shadow: 0 4px 12px rgba(237, 132, 56, 0.15) !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.vayura-searchable-select .vss-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    background: #fff !important;
    border: 1px solid #ED8438 !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
    display: none;
    z-index: 1000000 !important;
    overflow: hidden !important;
    margin-top: -1px !important;
    padding: 0 !important;
}

/* Ensure parent containers don't clip dropdowns */
.search-box-cover, .property-tab-section, .filters {
    overflow: visible !important;
}

.vayura-searchable-select.active .vss-dropdown {
    display: block !important;
}

.vayura-searchable-select .vss-search {
    width: calc(100% - 20px) !important; /* Adjust width to account for margins */
    margin: 10px !important; /* Add space around search input */
    padding: 10px 14px !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    outline: none !important;
}

.vayura-searchable-select .vss-search-wrap {
    padding: 12px;
    background: #fdfdfd;
    border-bottom: 1px solid #f0f0f0;
    display: none;
}

.vayura-searchable-select.active .vss-search-wrap {
    display: block !important;
}

.vayura-searchable-select .vss-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.vayura-searchable-select .vss-search-input:focus {
    border-color: #ED8438;
}

.vayura-searchable-select .vss-options {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px !important;
    overflow-y: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #ED8438 #f0f0f0;
    display: block; /* Ensure it behaves as a block to respect max-height */
    border-radius: 0 0 11px 11px; /* Match outer curve */
}

.vayura-searchable-select .vss-options::-webkit-scrollbar {
    width: 6px;
}

.vayura-searchable-select .vss-options::-webkit-scrollbar-thumb {
    background-color: #ED8438;
    border-radius: 10px;
}

.vayura-searchable-select .vss-option {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 15px;
    color: #444;
    border-bottom: 1px solid #f9f9f9;
}

.vayura-searchable-select .vss-option:hover {
    background: #fff5ee;
    color: #ED8438;
}

.vayura-searchable-select .vss-option.selected {
    background: #ED8438;
    color: white;
}

/* Fixed Owner Portal Button - TOP RIGHT */
#owner-panel-fixed-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ED8438;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    z-index: 999; /* Below Lightbox but above normal content */
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    transition: all 0.3s;
    border: 2px solid #fff;
    font-family: inherit;
    font-size: 13px;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
}

#owner-panel-fixed-btn:hover {
    background: #1a1a1a;
    transform: scale(1.05);
}

/* Mobile Fixes for 767px and below */
@media (max-width: 767px) {
  /* 1. Push filters below header to prevent logo overlap */
  .search-box-cover {
    position: relative !important;
    top: 0 !important;
    margin-top: 100px !important;
    z-index: 10 !important;
  }
  
  /* 2. Stack all filters vertically */
  .property-tab-section .filters {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 20px !important;
    gap: 15px !important;
  }
  
  /* 3. Make each filter Group (Property Type, Region, etc.) full width */
  .property-tab-section .filter-group {
    width: 100% !important;
    flex: 1 1 100% !important;
    margin-bottom: 0 !important;
  }
  
  /* Hide the vertical separator line between filters on mobile */
  .property-tab-section .filter-group::after {
    display: none !important;
  }
  
  /* 4. Stack 'Clear Filters' and 'Live Filtering' buttons */
  .property-tab-section .search-button {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    top: 0 !important;
    margin-top: 15px !important;
    width: 100% !important;
    display: flex !important;
  }
  
  .property-tab-section .search-button button {
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 20px !important;
    flex: none !important;
  }
  
  /* 5. Floating Owner Portal Button repositioned for mobile */
  #owner-panel-fixed-btn {
    top: auto !important;
    bottom: 25px !important;
    right: 20px !important;
    left: auto !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    width: auto !important;
    height: auto !important;
    white-space: nowrap !important;
    z-index: 9999 !important;
  }

  /* 6. Ensure property card footer (Price & Brochure) wraps cleanly */
  .pdf-btn-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }
}

/* Property Card Gallery Navigation & Indicators */
.v-card-nav {
    position: absolute; top: 50%; width: 44px; height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transform: translateY(-50%); z-index: 30; cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); border: 2px solid #ED8438;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0; pointer-events: none;
    color: #ED8438; font-size: 14px;
}

/* Make arrows visible on hover - with a stronger transition */
.property-single-boxarea .img1:hover .v-card-nav { 
    opacity: 1; 
    pointer-events: auto; 
}

.v-card-nav:hover { 
    background: #ED8438; 
    color: white !important; 
    transform: translateY(-50%) scale(1.15); 
}

.v-card-prev { left: 10px; }
.v-card-next { right: 10px; }

/* Move indicator to Top-Left to avoid conflict with the orange button at Bottom-Right */
.prop-card-gallery-indicator {
    position: absolute; top: 15px; left: 15px;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
    color: white; padding: 6px 14px; border-radius: 30px;
    font-size: 12px; font-weight: 800; z-index: 25;
    pointer-events: none; border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Premium Sold Out Overlay - Ensure it's behind the navigation if hovered but ahead of images */
.sold-out-banner {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 15; backdrop-filter: grayscale(1); pointer-events: none;
}

.sold-out-text {
    background: #ff4d4d; color: white; padding: 12px 40px;
    font-size: 24px; font-weight: 900; letter-spacing: 2px;
    text-transform: uppercase; border: 4px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    transform: rotate(-10deg);
}

.property-single-boxarea.is-sold-out .head,
.property-single-boxarea.is-sold-out .nm-btn a {
    opacity: 0.6;
}
/* Owner Portal Category Plus Buttons */
.add-cat-btn {
    background: #fef0e6 !important;
    border: 1px solid #fed7aa !important;
    color: #ED8438 !important;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 !important;
    margin-left: 10px;
}

.add-cat-btn:hover {
    background: #ED8438 !important;
    color: #fff !important;
    transform: scale(1.1);
}

.add-cat-btn i {
    font-size: 14px;
}
/* Custom Modals (Deletion & Category Entry) */
.v-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    display: none; align-items: center; justify-content: center;
    z-index: 10000; animation: fadeIn 0.3s ease;
}

.v-modal-box {
    background: white; padding: 30px; border-radius: 15px;
    width: 100%; max-width: 400px; box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    text-align: center; transform: translateY(20px); transition: transform 0.3s ease;
}

.v-modal-overlay.active { display: flex; }
.v-modal-overlay.active .v-modal-box { transform: translateY(0); }

.v-modal-title { font-size: 1.2rem; font-weight: 700; color: #1e293b; margin-bottom: 15px; }
.v-modal-text { font-size: 0.95rem; color: #64748b; margin-bottom: 25px; line-height: 1.5; }

.v-modal-actions { display: flex; gap: 12px; justify-content: center; }
.v-modal-btn { 
    padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; 
    border: none; transition: all 0.2s; font-size: 14px;
}
.v-modal-btn.confirm { background: #ff4d4d; color: white; }
.v-modal-btn.confirm:hover { background: #e60000; }
.v-modal-btn.save { background: #ED8438; color: white; }
.v-modal-btn.save:hover { background: #d9732e; }
.v-modal-btn.cancel { background: #f1f5f9; color: #64748b; }
.v-modal-btn.cancel:hover { background: #e2e8f0; }

.v-modal-input {
    width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px;
    margin-bottom: 20px; font-size: 14px; outline: none; transition: border-color 0.2s;
}
.v-modal-input:focus { border-color: #ED8438; }

/* Sync Toast */
.v-sync-toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: #1e293b; color: white; padding: 12px 24px; border-radius: 50px;
    font-size: 13px; font-weight: 600; box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 10001; display: none; align-items:center; gap: 10px;
}
.v-sync-toast i { color: #4ade80; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- Owner Portal Modal --- */
.vayura-portal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.vayura-portal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.vayura-portal-content-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.vayura-portal-overlay.active .vayura-portal-content-wrapper {
    transform: scale(1) translateY(0);
}

.vayura-portal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    color: #475569;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.vayura-portal-close:hover {
    background: #f8fafc;
    color: #ef4444;
    transform: rotate(90deg);
}

.vayura-portal-frame-container {
    width: 100%;
    height: 100%;
    background: #f8fafc;
}

/* Loading Spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #ED8438;
    border-radius: 50%;
    animation: portal-spin 1s linear infinite;
}

@keyframes portal-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .vayura-portal-overlay {
        padding: 0;
    }
}

/* Ensure theme's NiceSelect NEVER shows in the filter groups */
.filter-group .nice-select {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
