/* Extracted from property/details.blade.php inline <style> */

/* Keep possession + RERA readable on narrow screens */
.detailmainSec .endText .project-meta-line .meta-rera {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 767px) {
    .detailmainSec .endText .project-meta-line {
        line-height: 1.5;
    }
    .detailmainSec .endText .project-meta-line .line {
        margin: 0 6px;
    }
}

/* Disabled 3D button styling */
.disabled-3d-btn {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.disabled-3d-btn:hover {
    background-color: transparent !important;
    border-color: transparent !important;
}

.error-border {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}
.error-border:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}
.filtered-input {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25) !important;
    background-color: #fff3cd !important;
}
.filtered-input:focus {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25) !important;
}

/* Video section responsive design */
.leftVideo {
    width: 100%;
    position: relative;
}

/* Video Loading Spinner */
.video-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
    z-index: 5;
}

.video-loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.video-loading-spinner p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Advanced Lazy Loading Styles */
.lazy-load {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    will-change: opacity;
}

.lazy-load.loaded {
    opacity: 1;
}

.lazy-load.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Critical above-the-fold content */
.critical-content {
    content-visibility: auto;
    contain-intrinsic-size: 500px;
}

/* Non-critical content optimization */
.non-critical {
    content-visibility: auto;
    contain-intrinsic-size: 200px;
}

/* Performance optimization styles */
.performance-optimized {
    contain: layout style paint;
    will-change: auto;
}

/* Critical above-the-fold styles */
.critical-above-fold {
    content-visibility: visible;
    contain: none;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Image Grid Layout Fix */
.rightImg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

.boxImg {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
}

.boxImg.fourBox {
    grid-column: 1 / -1;
    height: 200px;
    position: relative;
}

.boxImg.fourBox a {
    display: block;
    width: 100%;
    height: 100%;
}

.boxImg a {
    display: block;
    width: 100%;
    height: 100%;
}

/* More Photos Button Styling */
.moreBnt {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.moreBnt.mobile {
    display: none;
}

.moreBnt a {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

.moreBnt a:hover {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    text-decoration: none;
}

/* Mobile responsive for more button */
@media (max-width: 768px) {
    .moreBnt.mobile {
        display: none; /* Hide mobile button, show on fourBox instead */
    }

    /* Show moreBnt on fourBox on mobile (like desktop) */
    .boxImg.fourBox .moreBnt:not(.mobile) {
        display: block !important;
    }

    .moreBnt a {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* Image Loading Placeholder */
.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    overflow: hidden;
    border-radius: 8px;
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 14px;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.image-placeholder i {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.6;
}

.image-placeholder span {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
}

/* Image loading animation */
.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

.property-details-empty {
    height: 100px;
    margin-top: 10px;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Loading state */
.image-container.loading .image-placeholder {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.image-container.loading .image-placeholder i {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Error state */
.image-container.error .image-placeholder {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #d32f2f;
}

.image-container.error .image-placeholder i {
    color: #d32f2f;
}

/* Hide placeholder when image loads */
.image-container.loaded .image-placeholder {
    opacity: 0;
    pointer-events: none;
}

.image-container.loaded .lazy-load {
    display: block !important;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Responsive Grid Layout */
@media (max-width: 768px) {
    .rightImg {
        grid-template-columns: repeat(2, 1fr) !important; /* Keep 2-column grid on mobile */
        gap: 0.75rem;
    }

    .boxImg {
        height: 180px;
    }

    /* Keep fourBox in 2-column grid (beside 3rd image) */
    .boxImg.fourBox {
        grid-column: auto !important; /* Remove full-width span */
    }

    .boxImg.fourBox a {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .rightImg {
        grid-template-columns: repeat(2, 1fr) !important; /* Keep 2-column grid */
        gap: 0.5rem;
    }

    .boxImg {
        height: 160px;
    }

    /* Keep fourBox in 2-column grid (beside 3rd image) */
    .boxImg.fourBox {
        grid-column: auto !important; /* Remove full-width span */
    }

    .boxImg.fourBox a {
        height: 160px;
    }

    .moreBnt a {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Ensure video section aligns with image gallery */
.imageGallery {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.videoCoverImage {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; /* Remove white background */
    border-radius: 8px;
    aspect-ratio: 16/9; /* Force consistent 16:9 aspect ratio for all videos */
    max-height: 100% !important;
    overflow: hidden; /* Ensure rounded corners are visible */
}

/* Prevent image and video downloads - Apply to ALL images on detail page */
.detail_Sec img,
.overview img,
.modal img,
.imageGallery img,
.imageGallery video,
.videoCoverImage video,
.gloryImg img,
.sliderImgSec img,
.detailmainSec img,
.imgBoxFloorPlan img,
.masterImg img {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    pointer-events: auto;
    -webkit-user-drag: none !important;
    -khtml-user-drag: none !important;
    -moz-user-drag: none !important;
    -o-user-drag: none !important;
    -webkit-touch-callout: none !important;
}

.imageGallery a,
.detail_Sec a img,
.overview a img,
.modal a img {
    user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
}

.videoCoverImage video {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 8px;
    object-fit: cover; /* Use cover to fill the container completely */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Add subtle shadow like images */
}

/* Play icon positioning */
.playIcon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.playIcon img {
    max-width: 80px;
    height: auto;
    transition: transform 0.3s ease;
}

.playIcon:hover img {
    transform: scale(1.1);
}

/* Fullscreen mode styles */
.video-fullscreen {
    overflow: hidden;
}

.video-fullscreen .leftVideo {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.video-fullscreen .videoCoverImage {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: unset !important;
    border-radius: 0 !important; /* Remove border radius in fullscreen */
}

.video-fullscreen .videoCoverImage video {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    border-radius: 0 !important; /* Remove border radius in fullscreen */
}

/* Video Controls Styling */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px 15px 15px;
    opacity: 0;
    visibility: hidden;
    display: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 4;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.video-controls.ready {
    opacity: 1;
    visibility: visible;
    display: block;
}

.videoCoverImage:hover .video-controls.ready {
    opacity: 1;
    visibility: visible;
    display: block;
}

.progress-container {
    margin-bottom: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-controls.ready .progress-container {
    opacity: 1;
}

.video-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.progress-filled {
    height: 100%;
    background: #ff0000;
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 12px;
    height: 12px;
    background: #ff0000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-progress-bar:hover .progress-handle {
    opacity: 1;
}

.controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-controls.ready .controls-row {
    opacity: 1;
}

.left-controls,
.right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.time-display {
    color: white;
    font-size: 14px;
    font-family: monospace;
    display: flex;
    align-items: center;
    gap: 2px;
}

.time-separator {
    opacity: 0.7;
}

/* Fullscreen controls adjustments */
.video-fullscreen .video-controls {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10001 !important;
    opacity: 1 !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .playIcon img {
        max-width: 60px;
    }
    .video-controls {
        padding: 15px 10px 10px;
    }
    .control-btn {
        font-size: 14px;
    }
    .time-display {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .playIcon img {
        max-width: 50px;
    }
    .video-controls {
        padding: 10px 8px 8px;
    }
    .control-btn {
        font-size: 12px;
        padding: 3px;
    }
    .time-display {
        font-size: 11px;
    }
    .left-controls,
    .right-controls {
        gap: 5px;
    }
}

/* Responsive builder logo images in modals - Natural display */
.modal .gloryImg {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Remove fixed dimensions and box styling */
}

.modal .gloryImg img {
    max-width: 120px; /* Double the original size */
    max-height: 120px;
    width: auto;
    height: auto;
    /* Remove object-fit to show natural proportions */
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 576px) {
    .modal .gloryImg img {
        max-width: 100px;
        max-height: 100px;
    }
}

@media (min-width: 768px) {
    .modal .gloryImg img {
        max-width: 140px;
        max-height: 140px;
    }
}

/* Ensure modal glorybox layout is responsive */
.modal .glorybox {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.modal .gloryText {
    flex: 1;
    min-width: 0; /* Allows text to wrap properly */
}

.modal .gloryText h6 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    word-wrap: break-word;
}

.modal .gloryText p {
    margin: 0;
    font-size: 14px;
    color: #666;
    word-wrap: break-word;
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .modal .glorybox {
        gap: 12px;
        margin-bottom: 15px;
    }

    .modal .gloryText h6 {
        font-size: 15px;
    }

    .modal .gloryText p {
        font-size: 13px;
    }
}

/* Download Insight Report Loading States */
.downloadInsightReportPdf {
    position: relative;
    transition: all 0.3s ease;
}

.downloadInsightReportPdf.processing {
    pointer-events: none;
    opacity: 0.7;
    cursor: not-allowed;
}

.downloadInsightReportPdf.processing .download-icon {
    display: none;
}

.downloadInsightReportPdf.processing .download-text {
    display: none;
}

.downloadInsightReportPdf.processing .download-loading {
    display: inline !important;
}

.downloadInsightReportPdf .download-loading {
    display: none;
}

.download-loading {
    color: #007bff;
    font-weight: 500;
}

.download-loading .fa-spinner {
    margin-right: 8px;
}

/* Success state */
.downloadInsightReportPdf.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.downloadInsightReportPdf.success .download-icon {
    color: #28a745;
}

/* Error state */
.downloadInsightReportPdf.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.downloadInsightReportPdf.error .download-icon {
    color: #dc3545;
}

/* Owl Carousel Navigation Styling for Similar Properties */
.developersProprty.mobileViewSection {
    position: relative;
}

.developersProprty.mobileViewSection .owl-carousel {
    position: relative;
}

/* Navigation arrows centered below carousel */
.developersProprty.mobileViewSection .owl-nav {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    z-index: 10;
}

.developersProprty.mobileViewSection .owl-nav button {
    background-color: var(--white-color);
    border: 2px solid var(--blue-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-color);
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    margin: 0;
    padding: 0;
    position: relative;
}

.developersProprty.mobileViewSection .owl-nav button:hover {
    background-color: var(--blue-color);
    color: var(--white-color);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 83, 149, 0.4);
}

.developersProprty.mobileViewSection .owl-nav button.owl-prev,
.developersProprty.mobileViewSection .owl-nav button.owl-next {
    position: relative;
    left: auto;
    right: auto;
}

.developersProprty.mobileViewSection .owl-nav button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.developersProprty.mobileViewSection .owl-nav button.disabled:hover {
    transform: scale(1);
    background-color: var(--white-color);
    color: var(--blue-color);
}

/* Center the dots navigation */
.developersProprty.mobileViewSection .owl-dots {
    text-align: center;
    margin-top: 15px;
}

.developersProprty.mobileViewSection .owl-dots .owl-dot {
    display: inline-block;
    margin: 0 5px;
}

.developersProprty.mobileViewSection .owl-dots .owl-dot span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #D9D9D9;
    display: block;
    transition: all 0.3s ease;
}

.developersProprty.mobileViewSection .owl-dots .owl-dot.active span,
.developersProprty.mobileViewSection .owl-dots .owl-dot:hover span {
    background-color: var(--blue-color);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .developersProprty.mobileViewSection .owl-nav {
        gap: 15px;
        margin-top: 15px;
    }

    .developersProprty.mobileViewSection .owl-nav button {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Owl Carousel Navigation Styling for Unit Plan Section */
.sliderImgSec {
    position: relative;
}

.sliderImgSec .owl-carousel {
    position: relative;
}

/* Navigation arrows centered below carousel */
.sliderImgSec .owl-nav {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    z-index: 10;
}

.sliderImgSec .owl-nav button {
    background-color: var(--white-color);
    border: 2px solid var(--blue-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-color);
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    margin: 0;
    padding: 0;
    position: relative;
}

.sliderImgSec .owl-nav button:hover {
    background-color: var(--blue-color);
    color: var(--white-color);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 83, 149, 0.4);
}

.sliderImgSec .owl-nav button.owl-prev,
.sliderImgSec .owl-nav button.owl-next {
    position: relative;
    left: auto;
    right: auto;
}

.sliderImgSec .owl-nav button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.sliderImgSec .owl-nav button.disabled:hover {
    transform: scale(1);
    background-color: var(--white-color);
    color: var(--blue-color);
}

/* Ensure smooth scrolling and correct direction */
.sliderImgSec .owl-stage {
    transition: transform 0.6s ease;
    display: flex;
    direction: ltr; /* Ensure left-to-right direction */
}

.sliderImgSec .owl-stage-outer {
    direction: ltr; /* Ensure left-to-right direction */
    overflow: hidden;
}

/* Prevent drag issues */
.sliderImgSec .owl-item {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    float: left; /* Ensure items float left for proper direction */
}

/* Hide dots navigation - not needed when nav arrows are present */
.sliderImgSec .owl-dots {
    display: none !important;
}

@media (max-width: 768px) {
    .sliderImgSec .owl-nav {
        gap: 15px;
        margin-top: 15px;
    }

    .sliderImgSec .owl-nav button {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}
