html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable; /* Reserve space for scrollbar to prevent layout shift */
}

fieldset {
    border: none;
    padding: 0;
    margin: 0;
    min-width: 0;
}

legend {
    padding: 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}


::-webkit-scrollbar-thumb {
    background: var(--color-blue-600);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-orange-500);
}

/* Property Cards */
.property-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}

.property-card:hover {
    transform: translateY(-8px) scale(1.02);
    z-index: 20;
}

.property-card.high-match {
    border: 2px solid #16a34a;
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.15);
}

.property-card.high-match:hover {
    box-shadow: 0 12px 35px rgba(22, 163, 74, 0.25);
}

/* Grid */
.property-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

/* Expandable Content */
.property-expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.property-expandable-content.expanded {
    max-height: 500px;
    transition: max-height 0.4s ease-in;
}

.expand-btn {
    transition: transform 0.3s ease;
}

.expand-btn.rotated {
    transform: rotate(180deg);
}

/* Chat Interface */
.chat-container {
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: clamp(320px, 25vw, 420px);
    min-width: 320px;
}

.chat-container.behind-modal {
    z-index: 998 !important;
}

.chat-section {
    height: 62%;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.controls-section {
    height: 38%;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 0.5rem;
    overflow: visible;
    display: flex;
    flex-direction: column;
}


.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: clamp(0.75rem, 1.5vw, 1.5rem);
    background: #f9fafb;
}


.message {
    margin-bottom: 1rem;
    display: flex;
    animation: slideIn 0.3s ease-out;
}

.message.user {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 80%;
    padding: clamp(0.5rem, 1vw, 0.75rem) clamp(0.75rem, 1.5vw, 1rem);
    border-radius: 1rem;
    word-wrap: break-word;
    font-size: clamp(0.75rem, 1vw, 0.875rem);
}

.message.assistant .message-bubble {
    background: white;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.message.user .message-bubble {
    background: var(--color-blue-600);
    color: white;
}

.image-preview {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin: 8px 0;
}

.chat-input-container {
    padding: clamp(0.75rem, 1.5vw, 1.25rem);
    background: white;
    border-top: 1px solid #e5e7eb;
    overflow: visible;
}


.agent-request-footer {
    padding: clamp(0.75rem, 1.5vw, 1.25rem);
    background: white;
    border-top: 1px solid #e5e7eb;
    overflow: visible;
}


#sendButton {
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0;
}
.typing-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #9ca3af;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1.4s infinite;
}


.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}
.quick-action-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 1rem;
    font-size: clamp(0.75rem, 1vw, 0.875rem);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}


.quick-action-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

/* Main Content */
.main-content {
    margin-left: clamp(320px, 25vw, 420px);
    width: calc(100vw - clamp(320px, 25vw, 420px));
    position: relative;
}

.main-nav {
    width: calc(100vw - clamp(320px, 25vw, 420px));
}

.content-container {
    max-width: none;
    padding-left: clamp(1rem, 3vw, 3rem);
    padding-right: clamp(1rem, 3vw, 3rem);
}

.welcome-section {
    padding: clamp(2rem, 5vw, 5rem) 0;
}

.welcome-card {
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 2px 4px 0 rgba(0, 0, 0, 0.08),
        0 12px 24px -4px rgba(0, 0, 0, 0.12);
}

/* Filters */
.slider {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}


.slider:hover {
    opacity: 1;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-blue-600);
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-blue-600);
    cursor: pointer;
    border: none;
}
.toggle-btn {
    flex: 1;
    padding: 0.375rem 0.5rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.75rem;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    will-change: background-color, color, border-color;
}


.toggle-btn:hover:not(.active) {
    background: #f3f4f6;
}
.property-type-btn:first-child {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.property-type-btn:last-child {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    border-left: none;
}

.property-type-btn.active {
    background: var(--color-blue-600);
    color: white;
    border-color: var(--color-blue-600);
}
.filter-loading {
    opacity: 0.6;
    pointer-events: none;
}

.filter-loading .search-btn {
    background: #9ca3af !important;
}
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.filter-mode-indicator {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: #e0f2fe;
    color: #0277bd;
    border: 1px solid #b3e5fc;
}


.reset-filters-btn {
    padding: 0.25rem 0.5rem;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
}


.reset-filters-btn:hover {
    background: #fde68a;
}
.mobile-filters-container .reset-filters-btn,
.mobile-filters-container .filter-mode-indicator {
    white-space: nowrap;
}

.mobile-filters-container .filter-header {
    min-height: 2.5rem;
    align-items: flex-start;
}

.mobile-filters-container .filter-header h4 {
    flex-shrink: 0;
}

.mobile-filters-container #filterModeActions {
    flex-wrap: nowrap;
    align-items: center;
}

.mobile-filters-container .filter-modal-header .reset-filters-btn {
    padding: 0.25rem 0.5rem;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-filters-container .filter-modal-header .reset-filters-btn:hover {
    background: #fde68a;
}

/* Modals */
.chat-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.chat-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.chat-backdrop.filters-active {
    display: block;
    z-index: 1001;
}
.agent-modal-container {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    z-index: 1002;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    contain: layout style paint;
    will-change: contents;
}

.agent-modal-container.modal-open {
    display: block;
    z-index: 1102;
}

.agent-modal-container #agentModalContent {
    overflow-y: auto;
    max-height: calc(85vh - 64px);
    padding: 1.5rem;
    padding-bottom: 0;
}

.agent-modal-container #agentModalContent form {
    padding-bottom: 1.5rem;
}

.agent-modal-container #agentModalContent > form > *:last-child {
    margin-bottom: 0 !important;
}


.contact-method-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
}

.contact-method-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    border-color: #10b981;
}

#agentContactEmail,
#agentContactPhone,
#agentContactWhatsApp {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: opacity 0.1s ease;
}

#agentContactEmail.hidden,
#agentContactPhone.hidden,
#agentContactWhatsApp.hidden {
    opacity: 0;
    pointer-events: none;
}

.agent-request-btn {
    position: relative;
}

.agent-request-btn.requested {
    background: #6b7280 !important;
    cursor: default;
}

.agent-request-btn.requested:hover {
    background: #6b7280 !important;
}

.property-use-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}
.property-use-btn.active {
  background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
  color: white;
  border-color: #10b981;
}

.agent-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Badges & Indicators */
.price-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.price-badge.single-price {
    background: var(--color-blue-600);
    color: white;
}

.price-badge.price-range {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.price-badge.price-on-request {
    background: #6b7280;
    color: white;
}
.requirements-matched {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #16a34a;
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}


.requirements-matched h5 {
    color: #15803d;
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


.requirement-item {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.125rem;
    border: 1px solid rgba(22, 163, 74, 0.2);
}


.requirement-item i {
    margin-right: 0.375rem;
    color: #16a34a;
}


.property-features .feature-tag {
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #e9d5ff;
}
.match-count-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
}


.match-count-badge i {
    margin-right: 0.25rem;
}

.perfect-match {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* Enhanced Loading Animation */
#loadingIndicator {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    width: 100%;
}

#loadingIndicator.hidden {
    display: none !important;
}

.enhanced-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.pulse-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6 0%, #667eea 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    animation: pulseLoader 1.5s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

@keyframes pulseLoader {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
        box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
    }
}

.animated-dots-text {
    color: #3b82f6;
    font-weight: 600;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
}

.animated-dots-text .dot {
    animation: blinkDot 1.4s infinite;
    margin-left: 0.1rem;
}

.animated-dots-text .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.animated-dots-text .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes blinkDot {
    0%, 80%, 100% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
}

/* Pagination */
.pagination-container {
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid #e5e7eb;
}


.pagination-info {
    text-align: center;
    margin-bottom: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}


.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    min-width: 2.5rem;
    text-align: center;
}


.pagination-btn:hover:not(:disabled):not(.active) {
    background: #f3f4f6;
    border-color: #9ca3af;
}


.pagination-btn.active {
    background: var(--color-blue-600);
    color: white;
    border-color: var(--color-blue-600);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-loading {
    pointer-events: none;
    opacity: 0.6;
}
.results-info {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #0ea5e9;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.results-info-text {
    color: #0c4a6e;
    font-weight: 500;
}


.results-info i {
    color: #0ea5e9;
    margin-right: 0.5rem;
}

/* Contact Nudges */
.notification-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1045;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-backdrop.active {
    display: block;
    opacity: 1;
}
.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out forwards;
}

.slide-out-right {
    animation: slideOutRight 0.3s ease-in forwards;
}

.scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}

.scale-out {
    animation: scaleOut 0.2s ease-in forwards;
}
.subtle-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #f3e8ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.subtle-banner.hidden {
    display: none !important;
}

.subtle-banner .icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-blue-600);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.subtle-banner .content {
    flex: 1;
}

.subtle-banner .content p {
    color: #1e40af;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
}


.subtle-banner .dismiss-btn {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    border: none;
}

.subtle-banner .dismiss-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #374151;
}
.slide-in-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 1050;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    opacity: 0;
    visibility: visible;
}

.slide-in-notification.hidden {
    display: none !important;
    visibility: hidden;
}

.slide-in-notification .header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.slide-in-notification .header .icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.slide-in-notification .header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.slide-in-notification .message {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.slide-in-notification .actions {
    display: flex;
    gap: 0.5rem;
}

.slide-in-notification .btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.slide-in-notification .btn-primary {
    background: white;
    color: #10b981;
}

.slide-in-notification .btn-primary:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.slide-in-notification .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.slide-in-notification .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}
.contact-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1049;
}

.contact-fab.behind-modal {
    z-index: 50 !important;
}

.contact-fab .fab-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    position: relative;
    animation: pulse 2s infinite;
    will-change: box-shadow;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.contact-fab .fab-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.5);
}

.contact-fab .fab-button i {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.contact-fab .fab-button .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    border: 2px solid white;
    min-width: 24px;
    text-align: center;
}

.contact-fab .fab-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-fab:hover .fab-tooltip {
    opacity: 1;
}

.contact-fab .fab-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #1f2937;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}
.celebration-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 1050;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    opacity: 0;
    visibility: visible;
}

.celebration-notification.hidden {
    display: none !important;
    visibility: hidden;
}

.celebration-notification .header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.celebration-notification .header .icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.celebration-notification .header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.celebration-notification .message {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.celebration-notification .actions {
    display: flex;
    gap: 0.5rem;
}

.celebration-notification .btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.celebration-notification .btn-primary {
    background: white;
    color: #f59e0b;
}

.celebration-notification .btn-primary:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.celebration-notification .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.celebration-notification .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}
.time-based-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 1050;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    opacity: 0;
    visibility: visible;
}

.time-based-notification.hidden {
    display: none !important;
    visibility: hidden;
}

.time-based-notification .header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.time-based-notification .header .icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.time-based-notification .header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.time-based-notification .message {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.time-based-notification .actions {
    display: flex;
    gap: 0.5rem;
}

.time-based-notification .btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.time-based-notification .btn-primary {
    background: white;
    color: #6366f1;
}

.time-based-notification .btn-primary:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.time-based-notification .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.time-based-notification .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Agent Success Notification */
.agent-success-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 1050;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    opacity: 0;
    visibility: visible;
}

.agent-success-notification.hidden {
    display: none !important;
    visibility: hidden;
}

.agent-success-notification .header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.agent-success-notification .header .icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.agent-success-notification .header h3 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.agent-success-notification .message {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.agent-success-notification .actions {
    display: flex;
    gap: 0.5rem;
}

.agent-success-notification .btn {
    flex: 1;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.agent-success-notification .btn-primary {
    background: white;
    color: #10b981;
}

.agent-success-notification .btn-primary:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Mobile Styles */
.mobile-filter-toggle {
    display: none;
    position: fixed;
    bottom: 90px;
    left: 20px;
    z-index: 50;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.mobile-filters-container {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 90vw;
    max-height: 70vh;
    z-index: 1002;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-filters-container .filter-modal-header {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.mobile-filters-container.mobile-open {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.mobile-filters-container .slider {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.mobile-chat-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 50;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-chat-toggle i {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.mobile-agent-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 90px;
    z-index: 50;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-agent-toggle.show {
    display: flex !important;
}
.chat-hint {
    display: none;
    position: fixed;
    bottom: 85px;
    left: 20px;
    z-index: 49;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.chat-hint-text {
    background: var(--color-blue-600);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    animation: fadeIn 0.5s ease-out;
}

.chat-hint-arrow {
    font-size: 2rem;
    color: var(--color-blue-600);
    animation: bounceArrow 1.5s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.mobile-chat-toggle.hint-active {
    animation: pulseGlow 2s ease-in-out infinite;
    will-change: box-shadow;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ========================================
   Property Details Modal
   ======================================== */

.property-details-modal-container {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    z-index: 1002;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.property-details-modal-container.modal-open {
    display: flex;
    flex-direction: column;
}

.property-details-modal-container .modal-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.property-details-modal-container .modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.property-details-modal-container .modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.125rem;
}

.property-details-modal-container .modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.property-details-modal-container .modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 64px);
}

/* Property Details Content Styles */
.property-details-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 20px;
}

.property-details-header {
    margin-bottom: 24px;
}

.property-details-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.property-location i {
    color: #3b82f6;
}

.property-price-badge {
    display: inline-block;
    background: linear-gradient(135deg, #16a34a 0%, #059669 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.property-details-section {
    margin-bottom: 24px;
}

.property-details-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.property-details-section h3 i {
    color: #667eea;
}

.property-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.property-info-item {
    background: #f9fafb;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.property-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.property-info-value {
    font-size: 0.95rem;
    color: #1f2937;
    font-weight: 600;
}

/* Facilities Grid */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.facility-item {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    color: #7c3aed;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e9d5ff;
    transition: all 0.2s ease;
}

.facility-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.15);
}

.facility-item i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* Make +X more badge clickable */
.property-features .feature-tag.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.property-features .feature-tag.clickable:hover {
    background: #e9d5ff;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.2);
}

.image-carousel {
    position: relative;
    height: 200px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    border-radius: 1rem;
}

.image-carousel .property-details-image.fade-in {
    animation: fadeIn 0.2s ease-in forwards;
}

.image-carousel .nav {
    position: absolute;
    top: 50%;
    width: auto;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: None;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    padding: 16px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.image-carousel .prev {
    left: 4px;
}

.image-carousel .next {
    right: 4px;
}

.image-carousel:hover .nav {
    opacity: 1;
}

.image-carousel .image-counter {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.6);
    color: #000;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
    
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .chat-backdrop {
        display: block;
    }

    .chat-container {
        display: none;
        width: 90%;
        max-width: 90vw;
        height: 75vh;
        max-height: 75vh;
        min-width: unset;
        z-index: 1000;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        border-radius: 1rem;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .chat-container.mobile-open {
        display: flex;
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    .chat-container.mobile-open .controls-section {
        display: none !important;
    }

    .chat-container.mobile-open .chat-section {
        height: 100% !important;
    }
    .chat-container.behind-modal {
        z-index: 998 !important;
    }

    .chat-container .chat-header {
        border-top-left-radius: 1rem;
        border-top-right-radius: 1rem;
    }

    .chat-container .chat-input-container {
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
        padding: 1rem;
    }

    .chat-container .agent-request-footer {
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
        padding: 1rem;
    }

    .mobile-filter-toggle.show {
        display: flex !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .main-nav {
        width: 100%;
        height: 60px;
    }

    .main-nav .content-container {
        padding: 0.75rem 1rem;
    }

    .main-nav .flex {
        height: 100%;
        align-items: center;
    }
    #shortlistToggle {
        padding: 0.5rem;
    }

    #shortlistCount {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 0.625rem;
        line-height: 1.25rem;
    }

    .mobile-chat-toggle {
        display: flex !important;
    }

    .chat-hint.show {
        display: flex !important;
    }

    .content-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .message-bubble {
        max-width: 85%;
        font-size: 0.875rem;
    }

    .chat-input-container {
        padding: 0.75rem;
    }

    .chat-input-container .flex {
        gap: 0.375rem;
    }

    #chatInput {
        font-size: 16px !important;
        min-width: 0;
    }

    #sendButton {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        padding: 0 !important;
        border-radius: 50% !important;
    }

    .chat-input-container button:first-child {
        padding: 0.5rem;
        min-width: 36px;
    }

    .welcome-section {
        padding: 2rem 0;
    }

    .property-card:hover {
        transform: none;
    }

    .property-card:active {
        transform: scale(0.98);
    }

    #resultsSection {
        padding-top: 75px;
        padding-bottom: 3rem;
    }

    button, .pagination-btn, .quick-action-btn {
        min-height: 44px;
    }

    .property-card button {
        padding: 0.75rem 1rem;
    }

    .property-card img {
        height: 120px !important;
    }

    .property-card .p-4 {
        padding: 0.625rem !important;
    }

    .property-card h3 {
        font-size: 0.95rem !important;
        margin-bottom: 0.375rem !important;
        line-height: 1.3 !important;
    }

    /* Property Details Modal - Mobile Adjustments */
    .property-details-modal-container {
        width: 90%;
        max-width: 90vw;
        max-height: 80vh;
        border-radius: 1rem;
    }

    .property-details-modal-container .modal-content {
        padding: 16px;
        max-height: calc(80vh - 64px);
    }

    .property-details-image {
        object-fit: cover;
        display: block;
    }

    .property-details-header {
        margin-bottom: 16px;
    }

    .property-details-header h2 {
        font-size: 1.125rem;
    }

    .property-info-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .facilities-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .property-price-badge {
        font-size: 1rem;
        padding: 6px 12px;
    }

    .property-details-section {
        margin-bottom: 16px;
    }

    .property-details-section h3 {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .property-card .mb-3 {
        margin-bottom: 0.375rem !important;
    }

    .property-card .mb-2 {
        margin-bottom: 0.375rem !important;
    }

    .property-card .text-sm {
        font-size: 0.8rem !important;
    }

    .property-card .flex.space-x-2 {
        margin-top: 0.625rem !important;
    }

    .property-card button {
        padding: 0.625rem 0.875rem !important;
        font-size: 0.8rem !important;
    }

    .property-card button[onclick^="togglePropertyExpand"] {
        padding: 0.375rem 0.5rem !important;
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }

    #welcomeMessage .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    #welcomeMessage h2 {
        font-size: 1.75rem;
    }

    #welcomeMessage p {
        font-size: 1rem;
    }

    .agent-modal-container {
        overflow: hidden !important;
        -webkit-border-radius: 1rem !important;
        border-radius: 1rem !important;
    }

    .slide-in-notification {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        padding: 1rem;
    }

    .slide-in-notification.slide-in-right {
        animation: none;
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    .slide-in-notification.slide-out-right {
        animation: fadeOut 0.3s ease-in forwards;
    }

    .slide-in-notification .header {
        margin-bottom: 0.625rem;
    }

    .slide-in-notification .header .icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .slide-in-notification .header h3 {
        font-size: 0.9rem;
    }

    .slide-in-notification .message {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
    }

    .slide-in-notification .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .contact-fab {
        bottom: 90px; /* Position above the mobile chat toggle */
        left: 20px; /* Align with mobile chat toggle */
    }

    .contact-fab .fab-button {
        width: 56px;
        height: 56px;
    }

    .contact-fab .fab-tooltip {
        display: none;
    }

    .celebration-notification {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        padding: 1rem;
    }

    .celebration-notification.slide-in-right {
        animation: none;
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    .celebration-notification.slide-out-right {
        animation: fadeOut 0.3s ease-in forwards;
    }

    .celebration-notification .header {
        margin-bottom: 0.625rem;
    }

    .celebration-notification .header .icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .celebration-notification .header h3 {
        font-size: 0.9rem;
    }

    .celebration-notification .message {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
    }

    .celebration-notification .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .time-based-notification {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        padding: 1rem;
    }

    .time-based-notification.slide-in-right {
        animation: none;
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    .time-based-notification.slide-out-right {
        animation: fadeOut 0.3s ease-in forwards;
    }

    .time-based-notification .header {
        margin-bottom: 0.625rem;
    }

    .time-based-notification .header .icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .time-based-notification .header h3 {
        font-size: 0.9rem;
    }

    .time-based-notification .message {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
    }

    .time-based-notification .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .agent-success-notification {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%);
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        padding: 1rem;
    }

    .agent-success-notification.slide-in-right {
        animation: none;
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    .agent-success-notification.slide-out-right {
        animation: fadeOut 0.3s ease-in forwards;
    }

    .agent-success-notification .header {
        margin-bottom: 0.625rem;
    }

    .agent-success-notification .header .icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .agent-success-notification .header h3 {
        font-size: 0.9rem;
    }

    .agent-success-notification .message {
        font-size: 0.8125rem;
        margin-bottom: 0.75rem;
    }

    .agent-success-notification .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .subtle-banner {
        padding: 0.875rem 1rem;
        font-size: 0.8125rem;
    }

    .subtle-banner .icon {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .property-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chat-container {
        width: 320px;
        min-width: 320px;
    }

    .main-content {
        margin-left: 320px;
        width: calc(100vw - 320px);
    }

    .main-nav {
        width: calc(100vw - 320px);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .property-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1536px) {
    .property-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 640px) {
    .pagination-controls {
        gap: 0.25rem;
    }

    .pagination-btn {
        padding: 0.375rem 0.5rem;
        min-width: 2rem;
        font-size: 0.75rem;
    }

    .pagination-info {
        font-size: 0.75rem;
    }
}
