/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background: #f8f8f8;
}

/* Property Styles */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.image-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    font-size: 1.2em;
    color: var(--text-color);
}

.error {
    color: #ff6b6b;
    padding: 20px;
    text-align: center;
    background-color: #2d2d2d;
    border-radius: 8px;
    margin: 20px 0;
}

/* VAPI Button Styles */
.vapi-btn {
    position: fixed !important;
    font-family: 'Arial', sans-serif !important;
    line-height: 1.5 !important; 
    z-index: 1000 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    right: 80px !important;
    bottom: 20px !important;
    width: auto !important;  /* Allow natural width on desktop */
}


/* Mobile-specific VAPI positioning */
@media screen and (max-width: 768px) {

    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-item img {
        height: 120px;
    }

    .room-label {
        font-size: 0.8em;
        padding: 3px 6px;
    }

    .feature-tag {
        font-size: 0.7em;
        padding: 2px 4px;
    }
}

/* Navigation buttons */
.nav-buttons {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    margin: 0;
    padding: 20px;
    background-color: var(--bg-color);
}

.nav-btn:first-child {
    float: left;
}

.nav-btn:last-child {
    float: right;
}

/* Add padding to the top of the container to account for fixed nav */
.property-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    padding-top: 80px; /* Increased top padding */
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .nav-buttons {
        padding: 10px;
        gap: 10px;
    }
    
    .nav-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .property-container {
        padding-top: 70px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .property-header {
        padding: 25px 0;
        margin-bottom: 30px;
    }

    .title-price {
        gap: 15px;
    }

    .title-price h1 {
        font-size: 1.8rem;
    }

    .price-badge {
        font-size: 1.2rem;
    }

    .full-address {
        font-size: 1rem;
    }
}

/* Modern Property Styles */
.property-header {
    padding: 0 16px;
    padding: 0px 0;
}

.header-content {
    display: flex;
    flex-direction: column;
}

.title-price {
    display: flex;
    align-items: center;
    gap: 20px;
}

.title-price h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.price-badge {
    font-size: 1.4rem;
    font-weight: 500;
    color: #7eb6ff;
    background: none;
    padding: 0;
}

.full-address {
    font-size: 1.1rem;
    color: #a0aec0;
    margin: 0;
}

.property-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.image-showcase {
    position: relative;
    margin-bottom: 30px;
}

.main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.property-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    margin-top: -50px;
    margin-left: 20px;
    margin-right: 20px;
    position: relative;
}

.stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-icon {
    font-size: 1.5rem;
}

.content-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-icon {
    color: #7eb6ff;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.gallery-item {
    position: relative;
}

.sidebar {
    position: sticky;
    top: 20px;
}

.agent-card, .location-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.agent-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.agent-avatar {
    width: 60px;
    height: 60px;
    background: #7eb6ff;
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.agent-title {
    color: #718096;
    margin: 0;
}

.agent-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    margin: 0;
    font-size: 0.95rem;
}

.contact-info .icon {
    color: #7eb6ff;
}

.contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.contact-button.phone {
    background: #7eb6ff;
    color: #1a1a1a;
}

.contact-button.email {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.contact-button:hover {
    opacity: 0.9;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .property-grid {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .property-stats {
        flex-direction: column;
        gap: 15px;
        margin-top: -30px;
    }

    .sidebar {
        position: static;
    }

    .title-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .title-price h1 {
        font-size: 1.75rem;
    }
    
    .price-badge {
        font-size: 1.1rem;
    }

    .property-container {
        padding-top: 60px;
    }
    
    .property-header {
        padding-bottom: 5px;
    }

    .agent-card {
        margin-bottom: 100px;
    }
}

/* Lightbox styles */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 15px;
    cursor: pointer;
    z-index: 1001;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-nav.prev {
    left: 10px;
}

.lightbox-nav.next {
    right: 10px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 15px;
    border-radius: 15px;
}

/* Remove all overlay behavior */
.image-analysis, 
.main-image-analysis {
    display: none; /* Remove the hover overlays completely */
}

/* Keep room labels visible on gallery thumbnails */
.room-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    z-index: 2;
}

/* Style the analysis as a separate section */
.lightbox-analysis {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
}

.room-type {
    color: #7eb6ff;
    font-size: 16px;
    margin-bottom: 8px;
}

.analysis-description {
    font-size: 14px;
    line-height: 1.4;
    margin: 8px 0;
}

.feature-tag {
    background: rgba(126, 182, 255, 0.1);
    color: #7eb6ff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 2px;
    display: inline-block;
}

/* Remove all transform and hover effects that were related to overlays */
.gallery-item:hover .image-analysis,
.image-showcase:hover .main-image-analysis {
    transform: none;
}

/* Dark theme support */
.dark-theme .lightbox-analysis,
.dark-theme .room-label {
    background: rgba(0, 0, 0, 0.9);
}

/* Agent Profile Styles */
.profile {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.profile-initials {
    font-size: 24px;
    font-weight: 500;
    color: #7eb6ff;
}

.agent-info {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.agent-name {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    color: var(--text-color);
}

.agent-title {
    font-size: 0.9rem;
    color: #a0aec0;
    margin: 4px 0 0 0;
}
 
.image-analysis, .main-image-analysis {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 12px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .image-analysis,
.image-showcase:hover .main-image-analysis {
    transform: translateY(0);
}

.analysis-description {
    font-size: 0.9em;
    margin-bottom: 8px;
}

.analysis-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.feature-tag {
    font-size: 0.8em;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

.main-image-analysis {
    z-index: 2;
}

.image-showcase {
    position: relative;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

/* Dark theme support */
.dark-theme .image-analysis,
.dark-theme .main-image-analysis {
    background: rgba(0, 0, 0, 0.85);
}

/* Room label and analysis styles */
.room-type {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
    color: #7eb6ff;
}

.image-analysis {
    display: none; /* Hide the hover analysis completely */
}

.gallery-item:hover .image-analysis {
    transform: none;
}

.lightbox-analysis {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
}

.analysis-description {
    margin: 8px 0;
    line-height: 1.4;
}

.analysis-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.feature-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

/* Dark theme support */
.dark-theme .image-analysis,
.dark-theme .lightbox-analysis,
.dark-theme .room-label {
    background: rgba(0, 0, 0, 0.9);
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .lightbox-nav {
        /* Adjust size for mobile */
        padding: 12px;
        font-size: 20px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-content {
        margin: 0 40px; /* Make room for navigation buttons */
    }
}


/* Loading State Styles */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-color);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--text-color);
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.error-state {
    text-align: center;
    padding: 40px;
    color: #dc3545;
    background: var(--card-bg);
    border-radius: 8px;
    margin: 20px;
}

.error-state h2 {
    margin-bottom: 10px;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Mobile styles */
@media screen and (max-width: 768px) {
    .lightbox-content {
        display: flex;
        flex-direction: column;
    }

    .lightbox-analysis {
        position: relative; /* Change from absolute to relative */
        margin-top: 10px; /* Add space between image and analysis */
    }
}

.property-content {
    margin-top: 32px;
}

.property-title {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    text-align: left;
    line-height: 1.2;
}

.location-price {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
    text-align: left;
}

.location {
    font-size: 18px;
    color: #666;
    line-height: 1.4;
}

.price {
    font-size: 18px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

/* Mobile Responsive with granular control */
@media screen and (max-width: 768px) {
    .property-content {
        margin-top: 8px;
    }

    .property-header {
        padding: 8px 12px 16px;
    }

    .property-title {
        font-size: 24px;
        line-height: 0.2;
        text-align: center;
        margin: 0;
        padding: 30px 0 8px;
    }

    .location-price {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
        margin: 0;
        padding: 0 0 4px;
    }

    .location {
        margin: 0;
        padding: 2px 0;
    }

    .price {
        margin: 0;
        padding: 2px 0;
    }
}

/* Updated Language Selector Styles */
.language-toggle {
    position: fixed !important;
    bottom: 25px !important;
    right: 20px !important;
    z-index: 1001 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    border: none !important;
    background-color: #2C5282 !important;
    color: white !important;
    cursor: pointer !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.language-toggle:hover {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15) !important;
}

#languageSelector {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important; /* Aligned with language toggle */
    z-index: 1002 !important; /* Increased to be above language toggle */
    padding: 12px !important;
    background-color: white !important;
    color: #333 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    min-width: 150px !important;
}

#languageSelector.hidden {
    display: none !important;
    opacity: 0 !important;
}

/* Mobile-specific positioning */
@media screen and (max-width: 768px) {
    .language-toggle {
        right: 10px !important;
        bottom: 25px !important;
        transform: translateX(-50%) !important;
    }

    #languageSelector {
        left: 50% !important;
        right: 10px !important;
        bottom: 90px !important;
        max-width: 300px !important;
    }
}

/* Dark theme support */
.dark-theme #languageSelector {
    background-color: #2d2d2d !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Updated z-index values */
.language-toggle {
    z-index: 1001 !important; /* Increased to be above VAPI button */
}

#languageSelector {
    z-index: 1002 !important; /* Increased to be above language toggle */
}

/* Ensure VAPI button stays at its current z-index */
.vapi-btn {
    z-index: 1000 !important; /* Keep existing z-index */
}
