@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 900;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-logo {
    text-decoration: none;
}

.header-logo-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    color: #333;
    letter-spacing: 0.05em;
}

.header-nav {
    display: flex;
    gap: 15px;
    align-items: center;
    position: relative;
}

/* Search */
.search-container {
    position: relative;
    flex: 1;
    max-width: 300px;
    margin: 0 15px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #999;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 8px 32px 8px 36px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.search-input:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.search-input::placeholder {
    color: #999;
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.search-clear-btn:hover {
    color: #666;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 200;
    margin-top: 4px;
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f5f5f5;
}

.search-result-neighborhood {
    background: #f8fafc;
    border-left: 3px solid #16a34a;
}

.search-result-neighborhood:hover {
    background: #f1f5f9;
}

.search-result-primary {
    font-weight: 500;
    color: #333;
}

.search-result-secondary {
    font-size: 12px;
    color: #666;
}

.search-result-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.search-result-badge.for-sale {
    background: #dcfce7;
    color: #166534;
}

.search-result-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.search-no-results {
    padding: 15px;
    text-align: center;
    color: #666;
}

/* Highlight marker (pulsing ring) */
.highlight-marker {
    position: relative;
    width: 60px;
    height: 60px;
}

.highlight-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #16a34a;
    border-radius: 50%;
    animation: pulse-ring 1.5s ease-out infinite;
}

.highlight-ring.delay {
    animation-delay: 0.75s;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Mobile search */
@media (max-width: 768px) {
    .search-container {
        max-width: 180px;
        margin: 0 10px;
    }

    .search-input {
        font-size: 13px;
        padding: 6px 28px 6px 32px;
    }

    .search-input::placeholder {
        font-size: 12px;
    }

    .search-results {
        position: fixed;
        left: 5%;
        right: 5%;
        width: 90%;
        top: 55px;
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .search-container {
        max-width: 140px;
        margin: 0 5px;
    }

    .search-input::placeholder {
        content: "Search...";
    }
}

.currency-toggle {
    display: flex;
    gap: 5px;
    align-items: center;
}

.currency-btn {
    padding: 5px 10px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 18px;
    transition: all 0.2s;
}

.currency-btn.flag-btn {
    padding: 4px 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
}

.currency-btn.flag-btn:hover {
    background: rgba(0,0,0,0.1);
}

.currency-btn.flag-btn.active {
    background: rgba(44, 85, 48, 0.15);
    box-shadow: 0 0 0 2px #2c5530;
}

.flag-icon {
    font-size: 1.3rem;
}

.currency-btn.active {
    background: #2c5530;
    color: white;
}

.currency-btn:hover:not(.active) {
    color: #333;
}

.nav-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.nav-btn-primary {
    background: #2c5530;
    color: white;
}

.nav-btn-primary:hover {
    background: #1e3d22;
}

.nav-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.nav-btn-secondary:hover {
    background: #e0e0e0;
}

.back-btn {
    display: none;
}

.back-btn.visible {
    display: inline-block;
}

.nav-btn-contact {
    background: white;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e7eb;
}

.nav-btn-contact:hover {
    background: #f5f5f5;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Mobile contact button - hidden on desktop */
.mobile-contact-btn {
    display: none !important;
}

/* Save Button */
.nav-btn-save {
    background: #f3f4f6;
    color: #6b7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.nav-btn-save:hover {
    background: #e5e7eb;
}

.nav-btn-save .save-btn-indicator {
    display: none;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.nav-btn-save.has-activity {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.nav-btn-save.has-activity .save-btn-indicator {
    display: inline-block;
}

.nav-btn-save.saved {
    background: #ecfdf5;
    color: #059669;
    border-color: #10b981;
}

.nav-btn-save.saved .save-btn-indicator {
    display: none;
}

/* Settings Button */
.settings-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-btn:hover {
    background: #e0e0e0;
}

.settings-icon {
    width: 20px;
    height: 20px;
    color: #555;
}

.settings-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 0.7rem;
    line-height: 1;
    background: white;
    border-radius: 3px;
    padding: 1px 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Header Filter Button (main filter icon in header) */
#filterBtn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

#filterBtn:hover {
    background: #e0e0e0;
}

/* Keep the same background when filter is active - don't turn green */
#filterBtn.active {
    background: #f0f0f0;
}

.filter-icon {
    width: 22px;
    height: 22px;
    color: #555;
}

.filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background: #555;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

/* Filter Overlay */
.filter-overlay {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 750;
}

.filter-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 360px;
    max-width: calc(100vw - 40px);
    overflow: hidden;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.filter-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.filter-close:hover {
    color: #333;
}

.filter-body {
    padding: 15px 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.filter-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.filter-section-header span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c5530;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-reset-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    color: #666;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-reset-btn:hover {
    background: #e5e7eb;
    color: #333;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.filter-apply-btn {
    flex: 1;
    padding: 10px 15px;
    background: #16a34a;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-apply-btn:hover {
    background: #15803d;
}

.filter-clear-btn {
    padding: 10px 15px;
    background: white;
    color: #666;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-clear-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Filter Matches Section */
.filter-matches-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.filter-star-legend {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #555;
}

.star-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star-legend-item .star {
    font-size: 1.1rem;
}

.star-legend-item .star.gold {
    color: #f59e0b;
}

.star-legend-item .star.silver {
    color: #9ca3af;
}

.filter-show-matches-btn {
    padding: 8px 16px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-show-matches-btn:hover:not(:disabled) {
    background: #1d4ed8;
}

.filter-show-matches-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Matches Modal */
#matchesModal {
    z-index: 300;  /* Above filter overlay (200) */
}

.matches-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.matches-modal .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.matches-modal .modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.matches-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.matches-group {
    margin-bottom: 20px;
}

.matches-group:last-child {
    margin-bottom: 0;
}

.matches-group-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.matches-group-title .star.gold {
    color: #f59e0b;
}

.matches-group-title .star.silver {
    color: #9ca3af;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.matches-item {
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.matches-item:hover {
    background: #f0f9ff;
    border-color: #3b82f6;
}

.matches-item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.matches-item-stats {
    font-size: 0.8rem;
    color: #666;
}

.matches-empty {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}

/* Neighborhood List Modal */
.neighborhood-list-modal {
    z-index: 600;
}

.neighborhood-list-modal.active {
    display: flex;
}

.neighborhood-list-panel {
    background: white;
    width: 100%;
    max-width: 450px;
    max-height: calc(100vh - 80px);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: nlSlideUp 0.3s ease;
    margin: auto 20px;
}

@keyframes nlSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.neighborhood-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.neighborhood-list-header .modal-title {
    margin: 0;
    font-size: 1.2rem;
    color: #1e3d22;
    font-weight: 600;
}

.neighborhood-list-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.neighborhood-list-filter-info {
    padding: 8px 20px;
    background: #fef3c7;
    border-bottom: 1px solid #fcd34d;
    font-size: 0.8rem;
    color: #92400e;
}

.neighborhood-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.neighborhood-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.neighborhood-list-item:last-child {
    margin-bottom: 0;
}

.neighborhood-list-item:hover {
    background: #f0f9f0;
    border-color: #22c55e;
}

.neighborhood-list-item.gold-match {
    background: #fffbeb;
    border-color: #fbbf24;
}

.neighborhood-list-item.silver-match {
    background: #f9fafb;
    border-color: #9ca3af;
}

.neighborhood-list-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    background: #e5e7eb;
    flex-shrink: 0;
}

.neighborhood-list-thumbnail-placeholder {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    background: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.neighborhood-list-thumbnail-placeholder svg {
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.6);
}

.neighborhood-list-info {
    flex: 1;
    min-width: 0;
}

.neighborhood-list-name {
    font-weight: 600;
    color: #1e3d22;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.neighborhood-list-name .star {
    font-size: 1rem;
}

.neighborhood-list-name .star.gold {
    color: #f59e0b;
}

.neighborhood-list-name .star.silver {
    color: #9ca3af;
}

.neighborhood-list-stats {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: #666;
}

.neighborhood-list-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.neighborhood-list-stat .stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.neighborhood-list-stat .stat-dot.for-sale {
    background: #22c55e;
}

.neighborhood-list-stat .stat-dot.pending {
    background: #f59e0b;
}

.neighborhood-list-empty,
.neighborhood-list-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.neighborhood-list-empty p,
.neighborhood-list-loading {
    margin: 0;
}

/* Sidebar mode for neighborhood list */
.neighborhood-list-modal.sidebar-mode {
    background: transparent;
    pointer-events: none;
}

.neighborhood-list-modal.sidebar-mode .neighborhood-list-panel {
    position: fixed;
    top: 60px;
    right: 0;
    bottom: 0;
    margin: 0;
    max-width: 400px;
    max-height: none;
    height: calc(100vh - 60px);
    border-radius: 0;
    pointer-events: auto;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@media (max-width: 767px) {
    .neighborhood-list-panel {
        max-height: calc(100vh - 60px);
        margin: 0;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
}

.filter-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.filter-tab:hover {
    color: #333;
}

.filter-tab.active {
    color: #16a34a;
    border-bottom-color: #16a34a;
}

.filter-tab-content {
    display: none;
}

.filter-tab-content.active {
    display: block;
}

/* Filter Section Layout */
.filter-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.filter-hint {
    font-weight: 400;
    color: #888;
    font-size: 0.8rem;
}

/* Property Tab Row Layout */
.filter-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-section-half {
    flex: 1;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-section-half:first-child {
    padding-right: 16px;
    border-right: 1px solid #e5e7eb;
}

.filter-section-half .filter-pills {
    flex-direction: column;
    gap: 6px;
}

.filter-section-half .filter-pill {
    width: 100%;
    text-align: center;
}

/* STR sub-options styling */
.str-suboptions {
    margin-top: 8px;
    margin-left: 20px;
    padding-left: 12px;
    border-left: 2px solid #e5e7eb;
}

.filter-checkbox-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
}

.filter-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f97316;
}

.filter-checkbox-text {
    font-weight: 500;
}

.filter-field {
    flex: 1;
    min-width: 0;
}

.filter-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-field select:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

/* Filter Pills (Material Design style) */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-pill {
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: white;
    font-size: 0.85rem;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: #16a34a;
    background: #f0fdf4;
}

.filter-pill.selected {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}

.filter-pill.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.filter-tab-content.active {
    display: block;
}

/* Checkbox Group */
.filter-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f3f4f6;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-checkbox-label:hover {
    background: #e5e7eb;
}

.filter-checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #16a34a;
}

/* STR Sub-options */
.str-suboptions {
    margin-top: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #f97316;
}

.str-suboptions .filter-checkbox-label {
    display: flex;
    background: white;
    margin-bottom: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.str-suboptions .filter-checkbox-label:last-child {
    margin-bottom: 0;
}

.str-suboptions .filter-checkbox-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-sub-options {
    margin-left: 10px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #16a34a;
    margin-top: -5px;
    margin-bottom: 15px;
}

.filter-sub-options .filter-checkbox-label {
    display: flex;
    background: white;
    margin-bottom: 6px;
}

.filter-sub-options .filter-checkbox-label:last-child {
    margin-bottom: 0;
}

/* Info Icon Button */
.info-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d1d5db;
    color: #555;
    font-size: 10px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    margin-left: 4px;
}

.info-icon-btn:hover {
    background: #9ca3af;
    color: white;
}

/* Info Modal */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
}

.info-modal-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 400px;
    margin: 20px;
    position: relative;
}

.info-modal-content h4 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: #333;
}

.info-modal-content p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.info-modal-content p:last-child {
    margin-bottom: 0;
}

.info-modal-content p:last-of-type {
    margin-bottom: 16px;
}

.info-modal-close {
    display: block;
    width: 100%;
    padding: 10px 20px;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
}

.info-modal-close:hover {
    background: #ea580c;
}

/* Settings Modal */
.settings-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.settings-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.settings-section-desc {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 16px;
}

.currency-options {
    display: flex;
    gap: 12px;
}

.currency-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.currency-option:hover {
    border-color: #ccc;
    background: #fafafa;
}

.currency-option.active {
    border-color: #2c5530;
    background: rgba(44, 85, 48, 0.05);
}

.currency-flag {
    font-size: 1.8rem;
}

.currency-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.currency-name {
    font-size: 0.8rem;
    color: #888;
}

.exchange-rate-note {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 12px;
}

.settings-link-btn {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
    color: #333;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.settings-link-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

/* Contact Modal */
.contact-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@media (max-width: 520px) {
    .contact-modal {
        max-width: 400px;
    }
}

.contact-intro {
    text-align: center;
    color: #666;
    margin-bottom: 24px;
}

.contact-agent {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 16px;
}

.agent-photo-placeholder {
    width: 70px;
    height: 70px;
    background: #ddd;
    border-radius: 50%;
    flex-shrink: 0;
}

.agent-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    flex-shrink: 0;
    border: 3px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.agent-info {
    flex: 1;
}

.agent-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.agent-title {
    color: #666;
    margin-bottom: 2px;
}

.agent-license {
    font-size: 0.85rem;
    color: #888;
}

.agent-phone {
    font-size: 0.9rem;
    color: #2c5530;
    font-weight: 500;
    margin-top: 4px;
}

.contact-broker {
    text-align: center;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 24px;
}

.broker-logo-placeholder {
    width: 150px;
    height: 40px;
    background: #f0f0f0;
    margin: 0 auto 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #999;
}

.broker-logo-placeholder::after {
    content: 'Logo Placeholder';
}

.broker-logo {
    width: 220px;
    height: auto;
    margin: 0 auto 10px;
    display: block;
}

.broker-name {
    font-size: 0.9rem;
    color: #666;
}

.broker-address {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 80px;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.contact-btn-primary {
    background: #2c5530;
    color: white;
}

.contact-btn-primary:hover {
    background: #1e3d22;
}

.contact-btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

.contact-btn-secondary:hover {
    background: #e8e8e8;
}

.contact-btn-subscribe {
    background: #2c5530;
    color: white;
}

.contact-btn-subscribe:hover {
    background: #1e3d22;
}

.contact-btn-icon {
    font-size: 1.1rem;
}

.contact-footer {
    margin-top: 20px;
    text-align: center;
}

.contact-note {
    font-size: 0.9rem;
    color: #2c5530;
    font-weight: 500;
    margin-bottom: 4px;
}

.contact-phone {
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
    margin: 0;
}

/* Contact Form */
.contact-form-section {
    margin-top: 20px;
    padding-top: 16px;
}

.contact-subscribe-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.subscribe-intro-text {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-align: center;
}

.contact-form-divider {
    text-align: center;
    margin-bottom: 16px;
    position: relative;
}

.contact-form-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #e0e0e0;
}

.contact-form-divider span {
    background: white;
    padding: 0 12px;
    position: relative;
    color: #888;
    font-size: 0.85rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-form input,
.contact-form textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2c5530;
}

.contact-form textarea {
    resize: vertical;
    min-height: 70px;
}

.contact-submit-btn {
    margin-top: 4px;
}

.contact-form-status {
    margin-top: 10px;
    text-align: center;
    font-size: 0.9rem;
}

.contact-form-status.success {
    color: #16a34a;
}

.contact-form-status.error {
    color: #dc2626;
}

.contact-form-status.loading {
    color: #666;
}

/* Canadian Resources Modal */
.canadian-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.canadian-intro {
    text-align: center;
    color: #666;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.canadian-currency-toggle {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.currency-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.currency-switch input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.switch-label {
    font-weight: 500;
    color: #333;
}

.exchange-note {
    font-size: 0.8rem;
    color: #888;
    margin-top: 8px;
    margin-left: 32px;
}

.canadian-resources h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #2c5530;
}

.resource-section {
    margin-bottom: 20px;
    padding: 16px;
    background: #fafafa;
    border-radius: 10px;
    border-left: 3px solid #2c5530;
}

.resource-section h4 {
    font-size: 1rem;
    color: #333;
    margin-bottom: 8px;
}

.resource-section p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.resource-section .coming-soon {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
}

.canadian-cta {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.canadian-cta p {
    margin-bottom: 16px;
    color: #666;
}

/* Subscribe Modal */
.subscribe-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.subscribe-intro {
    margin-bottom: 20px;
}

.subscribe-intro p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.subscribe-form-modal {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.subscribe-form-modal .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.subscribe-form-modal label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.subscribe-form-modal label .optional {
    font-weight: 400;
    color: #888;
}

.subscribe-form-modal input[type="email"],
.subscribe-form-modal textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.subscribe-form-modal input[type="email"]:focus,
.subscribe-form-modal textarea:focus {
    outline: none;
    border-color: #2c5530;
}

.subscribe-form-modal textarea {
    resize: vertical;
    min-height: 80px;
}

.subscribe-submit-btn {
    padding: 14px 24px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 8px;
}

.subscribe-submit-btn:hover {
    background: #1e3d22;
}

.subscribe-footer {
    margin-top: 16px;
    text-align: center;
}

.subscribe-note {
    color: #888;
    font-size: 0.8rem;
    margin: 0;
}

.subscribe-success {
    color: #166534;
    font-size: 0.95rem;
    text-align: center;
    padding: 20px;
}

.nav-btn-subscribe {
    background: transparent;
    color: #2c5530;
    border: 1px solid #2c5530;
}

.nav-btn-subscribe:hover {
    background: #2c5530;
    color: white;
}

/* Map Container */
#map {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 60px);
    transition: right 0.3s ease;
}

/* Map resizes when sidebar is pinned */
#map.sidebar-active {
    right: 450px;
    width: auto;
}

/* Neighborhood sidebar is slightly narrower */
#map.neighborhood-sidebar-active {
    right: 400px;
    width: auto;
}

/* Only apply sidebar resize on wider screens */
@media (max-width: 1199px) {
    #map.sidebar-active,
    #map.neighborhood-sidebar-active {
        right: 0;
    }
}

/* Modals always centered on screen regardless of drawers */
/* Floating label also stays centered */

/* Floating Neighborhood Label - blue to indicate selected neighborhood */
.neighborhood-floating-label {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.98), rgba(30, 64, 175, 0.98));
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    z-index: 90;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    cursor: pointer;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: top 0.1s ease-out, left 0.1s ease-out, box-shadow 0.2s;
}

.neighborhood-floating-label:hover {
    transform: translateX(-50%) scale(1.02);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.floating-label-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.floating-label-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.floating-label-top > span {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
}

.floating-label-action {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.neighborhood-floating-label:hover .floating-label-action {
    color: white;
}

.floating-label-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

.floating-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.floating-badge.for-sale {
    background: #22c55e;
}

.floating-badge.pending {
    background: #f59e0b;
}

/* REMOVED: floating-info-icon - replaced with "More Info" text */

/* Custom Marker Styles */
.neighborhood-marker {
    background: #2c5530;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.neighborhood-marker:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.neighborhood-marker .count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-size: 12px;
}

/* Property Markers */
.property-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s;
    border: 3px solid white;
}

.property-marker:hover {
    transform: scale(1.2);
}

.property-marker.for-sale {
    background: #22c55e;
}

.property-marker.pending {
    background: #f97316;
}

.property-marker.sold {
    background: #3b82f6;
}

.property-marker.off-market {
    background: #6b7280;
}

.property-marker.rental {
    background: #8b5cf6;
}

/* Info Window Styles */
.gm-style-iw {
    padding: 0 !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
}

.neighborhood-info {
    padding: 15px;
    min-width: 200px;
}

.neighborhood-info h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.1rem;
}

.neighborhood-info p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 0.9rem;
}

.neighborhood-info .view-btn {
    background: #2c5530;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
}

.neighborhood-info .view-btn:hover {
    background: #1e3d22;
}

/* Property Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

/* Modal z-index layering - above header (900) but below 10000+ overlays */
#neighborhoodModal.modal-overlay {
    z-index: 950;
}

#contactModal.modal-overlay {
    z-index: 960;
}

/* Property modal overlays on other modals */
#propertyModal.modal-overlay {
    z-index: 970;
}

.property-modal {
    background: white;
    border-radius: 12px;
    width: 80%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
    overflow: hidden;
}

.modal-overlay.active .property-modal {
    transform: translateY(0);
}

/* Fixed header that doesn't scroll */
.modal-header-fixed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: white;
    flex-shrink: 0;
    gap: 16px;
}

.modal-header-left {
    flex: 1;
    min-width: 0;
}

.modal-header-left .modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal-header-left .modal-subtitle {
    margin: 2px 0 0 0;
    font-size: 0.875rem;
    color: #666;
}

.modal-subtitle-btn {
    background: none;
    border: none;
    padding: 2px 0;
    margin: 2px 0 0 0;
    font-size: 0.875rem;
    color: #2c5530;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    font-family: inherit;
    text-align: left;
}

.modal-subtitle-btn:hover {
    color: #1a3a1e;
    text-decoration-style: solid;
}

.modal-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.modal-header-btn {
    padding: 8px 16px;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* Modal header with close button on right */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.modal-header .modal-title {
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-close:hover {
    background: #e0e0e0;
}

.modal-title {
    font-size: 1.4rem;
    margin: 0 0 5px 0;
    color: #333;
}

.modal-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.for-sale {
    background: #dcfce7;
    color: #166534;
}

.status-badge.pending {
    background: #ffedd5;
    color: #c2410c;
}

.status-badge.sold {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.off-market {
    background: #f3f4f6;
    color: #4b5563;
}

.status-badge.rental {
    background: #ede9fe;
    color: #6d28d9;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.property-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.property-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
}

.detail-value {
    font-weight: 500;
    color: #333;
}

.mls-dom {
    color: #666;
    font-weight: 400;
    font-size: 0.9em;
}

/* Open House row styling - Violet theme */
.open-house-row {
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    margin: 8px -15px;
    padding: 12px 15px !important;
    border-radius: 8px;
    border: 1px solid #c4b5fd !important;
}

.open-house-row .detail-label {
    color: #7c3aed;
    font-weight: 600;
}

.open-house-value {
    color: #7c3aed !important;
    font-weight: 600 !important;
}

.property-notes {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.property-notes h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #666;
}

.property-notes p {
    margin: 0;
    color: #333;
    font-style: italic;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s;
}

.modal-btn-primary {
    background: #2c5530;
    color: white;
}

.modal-btn-primary:hover {
    background: #1e3d22;
}

.modal-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.modal-btn-secondary:hover {
    background: #e0e0e0;
}

/* Gallery */
.property-gallery {
    margin-bottom: 20px;
}

.gallery-placeholder,
.gallery-loading {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    height: 200px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 0.9rem;
}

/* MLS Gallery */
.mls-gallery {
    border-radius: 8px;
    overflow: hidden;
}

.mls-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #f0f0f0;
}

.mls-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.mls-gallery-thumbs {
    display: flex;
    gap: 6px;
    padding: 8px 0;
    overflow-x: auto;
}

.gallery-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
}

/* Sales History */
.sales-history {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.sales-history-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.sale-history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.sale-history-item:last-child {
    border-bottom: none;
}

.sale-date {
    color: #6b7280;
    font-size: 0.9rem;
}

.sale-price {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.9rem;
}

/* Discuss Options Button */
.discuss-options-btn {
    width: 100%;
    padding: 12px 20px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 15px;
    transition: background 0.2s;
}

.discuss-options-btn:hover {
    background: #1e3d22;
}

/* MLS Description */
.mls-description {
    background: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    max-height: 150px;
    overflow-y: auto;
}

.mls-description p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #4b5563;
}

/* MLS Features */
.mls-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

.feature-tag {
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* MLS Broker Info (Compliance) */
.mls-broker-info {
    background: #f3f4f6;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 15px;
}

.mls-broker-info .broker-name {
    font-weight: 500;
    color: #374151;
}

.mls-broker-info .agent-name {
    font-size: 0.8rem;
    font-weight: normal;
    color: #6b7280;
}

.mls-broker-info .agent-contact {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* MLS Disclaimer (Compliance) */
.mls-disclaimer {
    background: #fefce8;
    border: 1px solid #fde047;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #713f12;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* MLS Retrieval Timestamp */
.mls-retrieved {
    font-size: 0.7rem;
    color: #9ca3af;
    text-align: center;
    padding: 8px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 10px;
}

/* User Location Marker */
.user-location-marker {
    position: relative;
    width: 24px;
    height: 24px;
}

.user-location-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #3b82f6;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.user-location-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    animation: location-pulse 2s ease-out infinite;
}

@keyframes location-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

.user-location-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.user-location-arrow svg {
    width: 100%;
    height: 100%;
}

/* Legend */
/* ============================================
   LEGEND WITH STATUS SELECTOR
   ============================================ */

.map-legend {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 8px 8px 0 0;
    border: none;
    box-shadow:
        0 -3px 8px rgba(0, 0, 0, 0.12),
        0 -6px 20px rgba(0, 0, 0, 0.08),
        2px 0 4px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    min-width: 100px;
    max-width: calc(100vw - 120px);
    transition: all 0.2s;
}

.map-legend:hover {
    box-shadow:
        0 -4px 12px rgba(0, 0, 0, 0.15),
        0 -8px 25px rgba(0, 0, 0, 0.1),
        2px 0 6px rgba(0, 0, 0, 0.08);
}

/* Map Controls Container - centered at bottom as drawer */
.map-controls-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 600;
}

/* Display label in collapsed legend */
.legend-handle-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    margin-right: 8px;
}

/* Properties Button - Right side, matches legend style */
.properties-button-container {
    position: absolute;
    bottom: 30px;
    right: 20px;
    z-index: 100;
}

.properties-button {
    background: white;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.properties-button:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    background: #f9f9f9;
}

.properties-button:active {
    background: #f5f5f5;
}

.properties-button-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
}

/* Hide properties button when sidebar is active */
body.properties-sidebar-active .properties-button-container {
    display: none;
}

@media (max-width: 767px) {
    .properties-button-container {
        bottom: 10px;
        right: 10px;
    }

    .properties-button {
        padding: 8px 12px;
    }

    .properties-button-label {
        font-size: 0.8rem;
    }
}

/* Legend Header with Map Type and Options buttons */
.legend-header {
    display: flex;
    gap: 6px;
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.legend-header-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    box-sizing: border-box;
}

.map-type-toggle {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.map-type-toggle:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

.legend-options-btn {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.legend-options-btn:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

.legend-options-btn.active {
    background: #e5e5e5;
    border-color: #999;
}

/* See Listings Container - Right side of screen */
.see-listings-container {
    position: absolute;
    bottom: 30px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Properties and Neighborhoods Buttons */
.see-properties-btn,
.see-neighborhoods-btn {
    padding: 10px 16px;
    min-width: 120px;
    background: #16a34a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.see-properties-btn:hover,
.see-neighborhoods-btn:hover {
    background: #15803d;
}

.see-neighborhoods-btn {
    background: #2c5530;
}

.see-neighborhoods-btn:hover {
    background: #1e3a21;
}

.see-properties-label,
.see-neighborhoods-label {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Legacy styles kept for compatibility */
.see-properties-top {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
}

.see-properties-bottom {
    font-size: 1rem;
    font-weight: 700;
}

.see-properties-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

.see-properties-badge svg {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
}

/* Collapsed Legend */
.legend-collapsed {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.legend-collapsed:hover {
    background: #f5f5f5;
}

.legend-collapsed:active {
    background: #eee;
}

.legend-expand-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-left: 4px;
    transition: transform 0.2s;
}

.legend-collapsed:hover .legend-expand-indicator {
    color: #666;
    transform: translateY(2px);
}

.legend-selected-statuses {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.legend-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-status-dot.for-sale { background: #22c55e; }
.legend-status-dot.pending { background: #f59e0b; }
.legend-status-dot.open-house { background: #8b5cf6; }
.legend-status-dot.recently-sold { background: #93c5fd; }
.legend-status-dot.off-market { background: #9ca3af; }
.legend-status-dot.favorites { background: #ec4899; }
.legend-status-dot.stars { background: #fbbf24; }

/* Tag boxes (squares) for tags in legend handle */
.legend-tag-box {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Tag icons (SVG symbols) for tags in legend handle */
.legend-tag-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.legend-tag-icon svg {
    width: 12px;
    height: 12px;
}

.legend-collapsed-divider {
    width: 1px;
    height: 14px;
    background: #e5e7eb;
}

.legend-collapsed-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: #666;
}

.legend-collapsed-label {
    color: #888;
}

.legend-collapsed-value {
    font-weight: 500;
}

.legend-expand-btn,
.legend-collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    color: #888;
    font-size: 0.7rem;
    transition: color 0.15s;
    border-radius: 4px;
}

.legend-expand-btn:hover,
.legend-collapse-btn:hover {
    color: #2c5530;
    background: #f0f0f0;
}

/* Expanded Legend */
.legend-expanded {
    padding: 0;
}

.legend-expanded-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.legend-expanded-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.legend-close-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #999;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.legend-close-btn:hover {
    color: #333;
}

.legend-columns {
    padding: 10px 12px;
}

.legend-status-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 6px 4px;
    border-radius: 4px;
    transition: background 0.15s;
}

.legend-status-option:hover {
    background: #f5f5f5;
}

.legend-status-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2c5530;
}

.legend-status-option .status-label {
    color: #333;
    flex: 1;
}

/* Toggle button styled like a status option */
.legend-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 6px 4px;
    border-radius: 4px;
    border: none;
    background: none;
    text-align: left;
    transition: background 0.15s;
}

.legend-toggle-btn:hover {
    background: #e8f5e9;
}

.legend-toggle-btn .status-label {
    color: #333;
    flex: 1;
}

.legend-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.legend-collapse-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 8px;
    padding: 6px;
    border-top: 1px solid #e5e7eb;
}

/* Status dots - shared styles */
.status-dot,
.legend-status-item .status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.status-dot.for-sale { background: #22c55e; }
.status-dot.pending { background: #f59e0b; }
.status-dot.recently-sold { background: #93c5fd; }
.status-dot.off-market { background: #9ca3af; }
.status-dot.neighborhood { background: #2c5530; }
.status-dot.filter { background: #6366f1; }
.status-dot.location { background: #3b82f6; }
.status-dot.zoning { background: linear-gradient(135deg, #a78bfa 50%, #34d399 50%); }
.status-dot.map-type { background: #64748b; }

/* Status tags - squares for New, Open House, Favorites */
.status-tag {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.status-tag.new { background: #eab308; }
.status-tag.open-house { background: #8b5cf6; }
.status-tag.favorites { background: #ec4899; }

/* Status icons for New, Open House, Favorites in Display drawer */
.status-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.status-icon-new { color: #eab308; }
.status-icon-openhouse { color: #8b5cf6; }
.status-icon-favorites { color: #ec4899; }

/* Filter row with checkbox and edit button */
.legend-filter-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-filter-option {
    flex: 1;
}

.legend-filter-option.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.legend-filter-option.disabled input[type="checkbox"] {
    cursor: not-allowed;
}

.legend-filter-option.disabled .status-label {
    color: #999;
}

.legend-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.15s;
}

.legend-edit-btn:hover {
    background: #e5e7eb;
    color: #333;
}

/* Legacy legend-color classes for compatibility */
.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.legend-color.for-sale { background: #22c55e; }
.legend-color.pending { background: #f59e0b; }
.legend-color.open-house { background: #8b5cf6; }
.legend-color.sold { background: #93c5fd; }
.legend-color.off-market { background: #9ca3af; }

/* Empty state for legend */
.legend-empty-state {
    color: #888;
    font-style: italic;
    font-size: 0.8rem;
}

/* Collapsed view additional items */
.legend-collapsed-divider {
    width: 1px;
    height: 20px;
    background: #e5e7eb;
    margin: 0 4px;
}

.legend-collapsed-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.75rem;
}

.legend-collapsed-label {
    color: #888;
}

.legend-collapsed-value {
    color: #333;
    font-weight: 500;
}

/* 3-Column Expanded Layout */
.legend-columns {
    display: flex;
    gap: 16px;
}

.legend-column {
    flex: 1;
    min-width: 120px;
}

.legend-column-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
}

/* Legacy toggle switch and action button styles removed - using checkboxes now */

/* ============================================
   PROPERTIES BUTTON
   ============================================ */

.properties-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.15s;
}

.properties-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.properties-btn .properties-icon {
    width: 20px;
    height: 20px;
    color: #333;
}

.properties-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ============================================
   PROPERTIES LIST MODAL
   ============================================ */

.properties-list-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 400;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
}

.properties-list-overlay.active {
    display: flex;
}

.properties-list-modal {
    background: white;
    width: 100%;
    max-width: 500px;
    max-height: calc(100vh - 80px);
    border-radius: 0 0 16px 16px;
    display: flex;
    flex-direction: column;
    animation: plSlideDown 0.3s ease;
}

@keyframes plSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (min-width: 768px) {
    .properties-list-overlay {
        padding-top: 80px;
    }

    .properties-list-modal {
        max-height: calc(100vh - 120px);
        border-radius: 12px;
        margin: 0 20px;
    }
}

/* Properties List Header */
.properties-list-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.properties-list-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sidebar toggle button - only visible on wide screens */
.sidebar-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    color: #555;
}

.sidebar-toggle-btn:hover {
    background: #e5e5e5;
    color: #333;
}

.sidebar-toggle-btn.active {
    background: #2c5530;
    color: white;
}

@media (min-width: 1200px) {
    .sidebar-toggle-btn {
        display: flex;
    }
}

/* Sidebar mode for properties list */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.properties-list-overlay.sidebar-mode {
    background: transparent;
    pointer-events: none;
}

.properties-list-overlay.sidebar-mode .properties-list-modal {
    position: fixed;
    top: calc(60px + 3%);
    right: 0;
    bottom: 3%;
    left: auto;
    width: 450px;
    max-width: 50%;
    max-height: none;
    height: auto;
    border-radius: 12px 0 0 12px;
    margin: 0;
    animation: slideInRight 0.3s ease;
    pointer-events: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

/* Hide listings handle when drawer is open */
body.listings-drawer-open .listings-handle {
    opacity: 0;
    pointer-events: none;
}

/* Main Tabs (Properties / Neighborhoods) */
.sidebar-main-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
}

.sidebar-main-tab {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.sidebar-main-tab:hover {
    color: #333;
    background: #f0f0f0;
}

.sidebar-main-tab.active {
    color: #2c5530;
    background: white;
}

.sidebar-main-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2c5530;
}

/* Sidebar Sections */
.sidebar-section {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;  /* Important for flex children to scroll */
}

.sidebar-section.active {
    display: flex;
}

/* Properties section inherits properties-list content styles */
#propertiesSection {
    flex: 1;
}

#propertiesSection .properties-list-content {
    flex: 1;
    min-height: 0;  /* Allow content to scroll */
}

/* Neighborhoods section in combined sidebar */
#neighborhoodsSection .neighborhood-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 0;  /* Allow content to scroll */
}

#neighborhoodsSection .neighborhood-list-filter-info {
    padding: 10px 16px;
    background: #fef3c7;
    border-bottom: 1px solid #fcd34d;
    font-size: 0.85rem;
    color: #92400e;
    flex-shrink: 0;
}

/* Mobile menu save item */
.mobile-menu-item .mobile-save-indicator {
    display: none;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-left: 8px;
}

.mobile-menu-item.has-activity .mobile-save-indicator {
    display: inline-block;
}

.mobile-menu-item.saved .mobile-save-text {
    color: #059669;
}

.mobile-menu-item.saved .mobile-save-indicator {
    display: none;
}

/* Map Filter Toggle */
.listings-map-toggle {
    display: flex;
    padding: 8px 12px;
    gap: 8px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.map-toggle-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}

.map-toggle-btn:hover {
    border-color: #16a34a;
    color: #16a34a;
}

.map-toggle-btn.active {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}

/* Display Tab Only button */
.display-tab-only-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    color: #666;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    margin-left: auto;
    transition: all 0.15s ease;
}

.display-tab-only-btn:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

.display-tab-only-btn.active {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}

/* User Save Popup */
.user-save-popup,
.user-prefs-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 980;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 340px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.user-save-popup.active,
.user-prefs-popup.active {
    display: block;
}

.user-save-popup-content,
.user-prefs-popup-content {
    padding: 24px;
    position: relative;
}

.user-save-popup-content h3,
.user-prefs-popup-content h3 {
    margin: 0 0 16px;
    font-size: 1.15rem;
    color: #1e3d22;
    padding-right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Help button */
.user-save-help-btn {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #9ca3af;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: all 0.15s;
}

.user-save-help-btn:hover {
    background: #e5e7eb;
    border-color: #6b7280;
    color: #374151;
}

.user-save-help-btn.active {
    background: #1e3d22;
    border-color: #1e3d22;
    color: white;
}

/* Help tooltip */
.user-save-help-tooltip {
    display: none;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #166534;
}

.user-save-help-tooltip.active {
    display: block;
}

.user-save-help-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #15803d;
}

.user-save-help-tooltip ul {
    margin: 0 0 10px 0;
    padding-left: 18px;
}

.user-save-help-tooltip li {
    margin: 4px 0;
}

.user-save-help-tooltip p {
    margin: 8px 0 0;
    line-height: 1.4;
}

.user-save-help-note {
    font-size: 0.8rem;
    color: #4ade80;
    font-style: italic;
}

.user-save-close,
.user-prefs-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 28px;
    height: 28px;
}

.user-save-close:hover,
.user-prefs-close:hover {
    color: #333;
}

/* Save summary */
.user-save-summary {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #166534;
}

/* Save form */
.user-save-form {
    margin-bottom: 16px;
}

.user-save-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.user-save-email {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.user-save-email:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.user-save-submit-btn {
    width: 100%;
    padding: 12px 16px;
    background: #16a34a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.user-save-submit-btn:hover {
    background: #15803d;
}

.user-save-submit-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Divider */
.user-save-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #9ca3af;
    font-size: 0.85rem;
}

.user-save-divider::before,
.user-save-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.user-save-divider span {
    padding: 0 12px;
}

/* Google button */
.user-save-google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}

.user-save-google-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.user-save-google-btn .google-icon {
    flex-shrink: 0;
}

/* Status message */
.user-save-status {
    font-size: 0.85rem;
    margin-top: 12px;
    text-align: center;
}

.user-save-status.success {
    color: #16a34a;
}

.user-save-status.error {
    color: #dc2626;
}

/* Agent section */
.user-save-agent,
.user-prefs-agent {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.user-save-agent-info,
.user-prefs-agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-save-agent-photo,
.user-prefs-agent-photo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.user-save-agent-name,
.user-prefs-agent-name {
    font-weight: 600;
    color: #1e3d22;
    font-size: 0.95rem;
}

.user-save-agent-company,
.user-prefs-agent-company {
    font-size: 0.85rem;
    color: #6b7280;
}

.user-save-contact-btn,
.user-prefs-contact-btn {
    width: 100%;
    padding: 10px 16px;
    background: white;
    color: #1e3d22;
    border: 1px solid #1e3d22;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
}

.user-save-contact-btn:hover,
.user-prefs-contact-btn:hover {
    background: #f0fdf4;
}

/* Preferences popup specific */
.user-prefs-email {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 12px;
}

.user-prefs-google-upgrade {
    width: 100%;
    padding: 8px 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    color: #0369a1;
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.15s;
}

.user-prefs-google-upgrade:hover {
    background: #e0f2fe;
}

.user-prefs-section {
    margin: 20px 0;
}

.user-prefs-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px;
}

.user-prefs-section h4 .coming-soon {
    font-weight: 400;
    color: #9ca3af;
    font-size: 0.8rem;
}

.user-prefs-data {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
}

.user-prefs-data-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}

.user-prefs-data-item svg {
    width: 16px;
    height: 16px;
    color: #16a34a;
}

.user-prefs-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #4b5563;
    cursor: pointer;
}

.user-prefs-checkbox input {
    accent-color: #16a34a;
}

.user-prefs-checkbox input:disabled {
    opacity: 0.5;
}

.user-prefs-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.user-prefs-send-latest {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.user-prefs-send-latest:hover {
    background: #2563eb;
}

.user-prefs-send-latest:disabled {
    background: #93c5fd;
    cursor: wait;
}

.user-prefs-send-latest svg {
    flex-shrink: 0;
}

.user-prefs-send-latest .spinner {
    animation: spin 1s linear infinite;
}

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

.user-prefs-clear-btn {
    flex: 1;
    padding: 10px 16px;
    background: white;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
}

.user-prefs-clear-btn:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.user-prefs-signout-btn {
    flex: 1;
    padding: 10px 16px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
}

.user-prefs-signout-btn:hover {
    background: #e5e7eb;
}

/* Neighborhood Group in tabs */
.pl-neighborhood-group {
    margin-bottom: 16px;
}

.pl-neighborhood-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.pl-neighborhood-header:hover {
    background: #e5e7eb;
}

.pl-neighborhood-name {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.pl-neighborhood-count {
    font-size: 0.75rem;
    color: #666;
    background: #e5e7eb;
    padding: 2px 8px;
    border-radius: 10px;
}

.pl-neighborhood-properties {
    padding-left: 12px;
    border-left: 2px solid #e5e7eb;
    margin-left: 12px;
}

/* Section dividers (On Map, Off Map, Filtered) */
.pl-section-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #9ca3af;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 12px;
    padding: 0 12px;
}

.pl-section-divider::before,
.pl-section-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.pl-section-divider::before {
    margin-right: 12px;
}

.pl-section-divider::after {
    margin-left: 12px;
}

.pl-section-divider.filtered {
    color: #d1d5db;
}

.pl-section-divider.first {
    margin-top: 8px;
}

/* Properties List Tabs (primary tabs) */
.properties-list-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 12px;
}

.pl-tab {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: none;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Allow "Open Houses" to wrap to two lines when space is tight */
.tab-label-wrap {
    white-space: normal;
    text-align: center;
    line-height: 1.2;
}

.pl-tab:hover {
    color: #333;
}

.pl-tab.active {
    color: #2c5530;
    border-bottom-color: #2c5530;
}

/* Tab badge (icon + count grouped together) */
.tab-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f3f4f6;
    padding: 2px 6px 2px 4px;
    border-radius: 10px;
    margin-left: 4px;
}

/* Tab icons */
.pl-tab-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Tab icon colors */
.pl-tab[data-tab="new"] .pl-tab-icon {
    color: #eab308;
}
.pl-tab[data-tab="open-houses"] .pl-tab-icon {
    color: #8b5cf6;
}
.pl-tab[data-tab="favorites"] .pl-tab-icon {
    color: #ec4899;
}

.pl-tab .tab-count {
    font-size: 0.7rem;
    font-weight: 600;
}

/* Tab-specific badge colors matching tag colors */
.pl-tab[data-tab="new"] .tab-badge {
    background: #fef3c7;
}
.pl-tab[data-tab="new"] .tab-count {
    color: #92400e;
}
.pl-tab[data-tab="new"].active .tab-badge {
    background: #fbbf24;
}
.pl-tab[data-tab="new"].active .tab-count {
    color: #78350f;
}

.pl-tab[data-tab="open-houses"] .tab-badge {
    background: #ede9fe;
}
.pl-tab[data-tab="open-houses"] .tab-count {
    color: #5b21b6;
}
.pl-tab[data-tab="open-houses"].active .tab-badge {
    background: #c4b5fd;
}
.pl-tab[data-tab="open-houses"].active .tab-count {
    color: #4c1d95;
}

.pl-tab[data-tab="favorites"] .tab-badge {
    background: #fce7f3;
}
.pl-tab[data-tab="favorites"] .tab-count {
    color: #9d174d;
}
.pl-tab[data-tab="favorites"].active .tab-badge {
    background: #f9a8d4;
}
.pl-tab[data-tab="favorites"].active .tab-count {
    color: #831843;
}

/* Properties List Content */
.properties-list-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.pl-tab-content {
    display: none;
}

.pl-tab-content.active {
    display: block;
}

/* Property Card */
.pl-date-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #16a34a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 12px 6px;
    margin-top: 4px;
}

.pl-date-header:first-child {
    margin-top: 0;
}

.pl-property-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.pl-property-card:hover {
    background: #f0fdf4;
}

.pl-property-card:last-child {
    margin-bottom: 0;
}

.pl-property-image {
    width: 80px;
    height: 60px;
    background: #e5e7eb;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.pl-property-image.pl-thumbnail-placeholder,
.pl-property-image.pl-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.pl-property-image.pl-thumbnail-placeholder::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-top-color: #9ca3af;
    border-radius: 50%;
    animation: pl-spin 0.8s linear infinite;
}

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

.pl-property-image.pl-no-photo::after {
    content: '';
    width: 24px;
    height: 24px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: none;
}

.pl-property-info {
    flex: 1;
    min-width: 0;
}

.pl-property-address {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-property-neighborhood {
    color: #666;
    font-size: 0.75rem;
    margin-top: 1px;
}

.pl-property-details {
    color: #666;
    font-size: 0.8rem;
    margin-top: 2px;
}

.pl-property-price {
    color: #2c5530;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 4px;
}

.pl-property-tag {
    display: inline-block;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    font-weight: 500;
}

.pl-property-tag.new {
    background: #dbeafe;
    color: #1e40af;
}

.pl-property-tag.open-house {
    background: #f3e8ff;
    color: #7c3aed;
}

/* Property Card Main Content (for action panel layout) */
.pl-property-main {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

/* Property Card Action Panel */
.pl-property-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0 4px 8px;
    border-left: 1px solid #e5e7eb;
    margin-left: auto;
}

.pl-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.15s;
}

.pl-action-btn svg {
    width: 16px;
    height: 16px;
}

.pl-action-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.pl-action-map:hover {
    color: #2c5530;
}

.pl-action-like {
    color: #9ca3af;
}

.pl-action-like:hover {
    color: #ec4899;
    background: #fce7f3;
}

.pl-action-like.liked {
    color: #ec4899;
    background: #fce7f3;
}

.pl-action-like.liked svg {
    fill: currentColor;
}

/* Agent Mode: Item added to response list */
.pl-action-like.in-response-list,
.in-response-list {
    color: #3b82f6 !important;
    background: #dbeafe !important;
}

.pl-action-like.in-response-list svg,
.in-response-list svg {
    fill: currentColor;
}

.pl-action-calendar:hover {
    color: #8b5cf6;
    background: #ede9fe;
}

/* Empty State */
.pl-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.pl-empty-state svg {
    width: 48px;
    height: 48px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.pl-empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Properties List Favorites Tab */
.pl-favorites-send-section {
    padding: 12px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.pl-favorites-send-row {
    display: flex;
    gap: 8px;
}

.pl-favorites-email {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
}

.pl-favorites-email:focus {
    outline: none;
    border-color: #2c5530;
}

.pl-favorites-send-btn {
    padding: 8px 16px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.pl-favorites-send-btn:hover {
    background: #1e3d22;
}

.pl-favorites-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pl-favorites-send-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pl-favorites-copy-todd-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.pl-favorites-copy-todd {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
}

.pl-favorites-copy-todd input {
    margin: 0;
}

.pl-favorites-send-status {
    font-size: 0.8rem;
    margin-top: 6px;
}

.pl-favorites-send-status.success {
    color: #16a34a;
}

.pl-favorites-send-status.error {
    color: #dc2626;
}

.pl-favorites-section {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.pl-favorites-section:last-child {
    border-bottom: none;
}

.pl-favorites-section-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 10px;
}

.pl-favorites-section-title .pl-count {
    color: #666;
    font-weight: 400;
}

.pl-oh-day-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b5cf6;
    padding: 8px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pl-favorites-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.pl-favorites-item:hover {
    background: #f3f4f6;
}

.pl-favorites-delete {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    font-weight: 300;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.pl-favorites-item:hover .pl-favorites-delete {
    opacity: 1;
}

.pl-favorites-delete:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Mobile: always show delete button (no hover on touch devices) */
@media (max-width: 768px) {
    .pl-favorites-delete {
        opacity: 1;
        background: #f3f4f6;
    }
}

.pl-favorites-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #666;
    overflow: hidden;
}

.pl-favorites-icon.neighborhood {
    background: #dcfce7;
    color: #16a34a;
}

.pl-favorites-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pl-nested-item {
    padding-left: 50px;
}

.pl-nested-item .pl-favorites-icon {
    width: 32px;
    height: 32px;
}

.pl-favorites-info {
    flex: 1;
    min-width: 0;
}

.pl-favorites-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pl-favorites-meta {
    font-size: 0.8rem;
    color: #666;
    margin-top: 2px;
}

.pl-favorites-oh-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.pl-favorites-oh-time {
    font-size: 0.8rem;
    color: #8b5cf6;
    font-weight: 500;
}

.pl-favorites-calendar {
    font-size: 0.7rem;
    color: #2563eb;
    text-decoration: none;
}

.pl-favorites-calendar:hover {
    text-decoration: underline;
}

.pl-favorites-open-houses {
    background: #faf5ff;
}

/* Hide filter and settings buttons - they're in hamburger menu now */
#filterBtn,
.settings-btn {
    display: none !important;
}

/* Hamburger button - always visible for consistent UI */
.hamburger-btn {
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.2s;
}

.hamburger-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.hamburger-icon {
    width: 18px;
    height: 18px;
    color: #555;
}

/* Filter badge on hamburger button - green dot (larger) */
.hamburger-filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Favorites badge on hamburger button - thumbs up */
.hamburger-favorites-badge {
    position: absolute;
    bottom: -4px;
    right: -6px;
    font-size: 14px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

/* Menu item badges (inside dropdown) */
/* Generic menu badge - grey circle with count */
.menu-badge {
    margin-left: auto;
    background: #6b7280;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.menu-open-house-badge {
    background: #8b5cf6;
}

/* Mobile menu - hidden by default, works on all screen sizes */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px;
    min-width: 160px;
    z-index: 800;
}


.mobile-menu.open {
    display: block;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 0.95rem;
    color: #333;
    cursor: pointer;
    border-radius: 6px;
}

.mobile-menu-item:hover {
    background: #f0f0f0;
}

.mobile-menu-item[href] {
    text-decoration: none;
}

.mobile-menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.mobile-menu-item.location-active {
    background: #dbeafe;
    color: #2563eb;
}

.mobile-menu-item.location-active .mobile-menu-icon {
    color: #3b82f6;
}

.mobile-menu-icon {
    width: 20px;
    height: 20px;
    color: #555;
    flex-shrink: 0;
}

/* Indented submenu items */
.mobile-menu-item-indent {
    padding-left: 48px;
    font-size: 0.85rem;
    color: #666;
}

.mobile-menu-item-indent .mobile-menu-icon {
    width: 16px;
    height: 16px;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .header {
        padding: 0 15px;
    }

    .header-logo img {
        height: 32px;
    }

    .header-logo-title {
        font-size: 0.9rem;
        display: flex;
        flex-direction: column;
        line-height: 1.1;
        text-align: center;
    }

    .header-logo-title .logo-slow,
    .header-logo-title .logo-maui {
        display: block;
    }

    .header-logo-subtitle {
        font-size: 0.65rem;
    }

    /* Hamburger menu for mobile */
    .header-nav {
        position: relative;
    }

    /* Hide desktop contact button, show mobile contact button */
    #contactBtn,
    .settings-btn,
    #filterBtn {
        display: none !important;
    }

    .mobile-contact-btn {
        display: inline-block !important;
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .hamburger-btn {
        display: flex !important;
    }

    .mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        padding: 8px;
        min-width: 160px;
        z-index: 800;
    }

    .mobile-menu.open {
        display: block;
    }

    .mobile-menu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 12px 16px;
        border: none;
        background: none;
        text-align: left;
        font-size: 0.95rem;
        color: #333;
        cursor: pointer;
        border-radius: 6px;
    }

    .mobile-menu-item:hover {
        background: #f0f0f0;
    }

    .mobile-menu-icon {
        width: 20px;
        height: 20px;
        color: #555;
        flex-shrink: 0;
    }

    /* Indented submenu items (mobile) */
    .mobile-menu-item-indent {
        padding-left: 48px;
        font-size: 0.85rem;
        color: #666;
    }

    .mobile-menu-item-indent .mobile-menu-icon {
        width: 16px;
        height: 16px;
    }

    /* Larger badges on mobile (1.5x size) */
    .marker-badge {
        min-width: 21px !important;
        height: 21px !important;
        padding: 0 5px !important;
        border-radius: 11px !important;
        font-size: 13px !important;
    }

    /* All modals constrained to 95% width/height on mobile */
    .property-modal,
    .neighborhood-modal,
    .about-modal,
    .settings-modal,
    .contact-modal,
    .canadian-modal {
        width: 95% !important;
        max-width: 95vw !important;
        max-height: 85vh !important;
        overflow: hidden;
    }

    .property-modal .modal-body,
    .neighborhood-modal .modal-body,
    .about-modal .modal-body {
        max-height: calc(85vh - 80px);
        overflow-y: auto;
    }

    /* Limit gallery height on mobile */
    .mls-gallery-main {
        max-height: 200px;
    }

    .mls-gallery-main img {
        max-height: 200px;
        object-fit: cover;
    }

    .modal-header-fixed {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-header-left .modal-title {
        font-size: 1.1rem;
    }

    .modal-header-right {
        gap: 8px;
    }

    .modal-header-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .property-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-actions {
        flex-direction: column;
    }

    .map-controls-container {
        /* Keep centered on mobile */
        left: 50%;
        transform: translateX(-50%);
        bottom: 10px;
        flex-direction: row;
        align-items: flex-end;
        gap: 6px;
    }

    .map-legend {
        max-width: calc(100vw - 130px);
    }

    .legend-header {
        padding: 6px;
        gap: 4px;
    }

    .legend-header-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }

    .legend-collapsed {
        padding: 6px 8px;
        gap: 6px;
    }

    .see-listings-container {
        bottom: 10px;
        right: 10px;
        gap: 6px;
    }

    .see-properties-btn,
    .see-neighborhoods-btn {
        padding: 8px 12px;
        min-width: 100px;
        font-size: 0.8rem;
    }

    .see-properties-btn {
        padding: 8px 14px;
        min-height: 50px;
    }

    .see-properties-top {
        font-size: 0.75rem;
    }

    .see-properties-bottom {
        font-size: 0.85rem;
    }

    /* Stack columns vertically on mobile */
    .legend-columns {
        flex-direction: column;
        gap: 12px;
    }

    .legend-column {
        min-width: unset;
    }

    .legend-column-header {
        margin-bottom: 6px;
    }

    .legend-title {
        font-size: 0.8rem;
    }

    .legend-item {
        font-size: 0.75rem;
    }

    /* Larger badges on mobile */
    .floating-badge {
        min-width: 24px;
        height: 24px;
        font-size: 13px;
        padding: 0 8px;
    }

    .neighborhood-floating-label {
        padding: 10px 16px;
    }

    .floating-label-top > span {
        font-size: 1rem;
    }

    /* Chart filters - vertical layout on mobile */
    .chart-filters {
        flex-direction: column;
        gap: 12px;
        margin-top: 15px;
        margin-bottom: 0;
    }

    .chart-filters .filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        width: 100%;
    }

    .chart-filters .filter-group label {
        font-weight: 600;
        color: #444;
    }

    .chart-filters .filter-buttons {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .chart-filters .filter-btn {
        flex: 1;
        min-width: 60px;
        border-radius: 4px !important;
        border: 1px solid #ccc !important;
        text-align: center;
    }
}

/* Neighborhood Modal */
.neighborhood-modal {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .neighborhood-modal {
    transform: translateY(0);
}

/* About Modal */
.about-modal {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .about-modal {
    transform: translateY(0);
}

.about-modal-body {
    padding: 20px;
}

.about-section {
    margin-bottom: 24px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c5530;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f0e8;
}

.about-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 16px 0 8px 0;
}

.about-section p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 12px;
}

.about-disclaimer {
    margin-top: 24px;
}

/* Neighborhood Disclaimer */
.neighborhood-disclaimer {
    margin-top: 20px;
}

.neighborhood-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Compact single-row stats for Sales Data tab */
.neighborhood-stats.sales-stats-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 10px;
}

.neighborhood-stats.sales-stats-row .stat-item {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: none;
}

.neighborhood-stats.sales-stats-row .stat-value {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c5530;
    white-space: nowrap;
}

.neighborhood-stats.sales-stats-row .stat-label {
    font-size: 0.65rem;
    color: #666;
    margin-top: 1px;
    white-space: nowrap;
}

.neighborhood-stats .stat-item {
    text-align: center;
}

.neighborhood-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c5530;
}

.neighborhood-stats .stat-label {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.chart-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

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

.filter-group label {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

.filter-buttons {
    display: flex;
    gap: 0;
}

.filter-btn {
    padding: 5px 12px;
    border: 1px solid #ccc;
    background: white;
    color: #666;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.filter-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.filter-btn:not(:first-child) {
    border-left: none;
}

.filter-btn.active {
    background: #2c5530;
    border-color: #2c5530;
    color: white;
}

.filter-btn:hover:not(.active) {
    background: #f0f0f0;
}

.chart-toggle {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 15px;
}

.toggle-btn {
    padding: 8px 20px;
    border: 1px solid #2c5530;
    background: white;
    color: #2c5530;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.toggle-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.toggle-btn.active {
    background: #2c5530;
    color: white;
}

.toggle-btn:hover:not(.active) {
    background: #f0f7f0;
}

.chart-container {
    position: relative;
    height: 300px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* Neighborhood Modal Tabs */
.neighborhood-tabs {
    display: flex;
    border-bottom: 2px solid #e5e5e5;
    padding: 0 20px;
}

.neighborhood-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.neighborhood-tab:hover {
    color: #333;
}

.neighborhood-tab.active {
    color: #2c5530;
    border-bottom-color: #2c5530;
}

.neighborhood-tab-content {
    display: none;
}

.neighborhood-tab-content.active {
    display: block;
}

/* Units for Sale List */
.for-sale-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.for-sale-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.for-sale-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.for-sale-item:hover {
    background: #f0f7f0;
    border-color: #2c5530;
}

.for-sale-item-info {
    flex: 1;
}

.for-sale-item-unit {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 4px;
}

.for-sale-item-details {
    font-size: 0.85rem;
    color: #666;
}

.for-sale-item-right {
    text-align: right;
}

.for-sale-item-price {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c5530;
    margin-bottom: 4px;
}

.for-sale-item-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.for-sale-item-status.for-sale {
    background: #dcfce7;
    color: #166534;
}

.for-sale-item-status.pending {
    background: #ffedd5;
    color: #c2410c;
}

/* Overview Tab */
.overview-content {
    padding: 10px 0;
}

/* Compact stats row - all 4 in one line */
.overview-stats-row {
    display: flex;
    justify-content: space-between;
    background: #f8faf8;
    border-radius: 8px;
    padding: 12px 8px;
    margin-bottom: 16px;
    border: 1px solid #e8f0e8;
}

.overview-stat-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0 4px;
}

.overview-stat-compact .stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #2c5530;
    line-height: 1.2;
}

.overview-stat-compact .stat-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

.overview-description {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    margin: 16px 0;
}

/* Neighborhood Info Table - Material Design style */
.attributes-content {
    padding: 0;
    margin-top: 16px;
}

.info-table-header {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    padding: 8px 0;
    border-bottom: 2px solid #2c5530;
    margin-bottom: 4px;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.info-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table td {
    padding: 10px 0;
    vertical-align: top;
}

.info-table-label {
    color: #666;
    font-weight: 500;
    width: 45%;
    padding-right: 12px;
}

.info-table-value {
    color: #333;
    text-align: right;
}

.overview-tags {
    margin-bottom: 20px;
}

.overview-tags-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.overview-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.overview-tag {
    background: #e8f5e9;
    color: #2c5530;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
}

.overview-tag.negative {
    background: #fef2f2;
    color: #991b1b;
}

.overview-amenities {
    margin-top: 20px;
}

.overview-amenities-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.overview-amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.overview-amenity {
    background: #f3f4f6;
    color: #374151;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
}

/* Image Carousel */
.overview-carousel {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.carousel-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 12px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #f0f0f0;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    display: block;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 0.85rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: all 0.2s;
    z-index: 10;
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Fullscreen button for carousel */
.carousel-fullscreen-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.carousel-fullscreen-btn:hover {
    background: rgba(0,0,0,0.7);
}

/* Fullscreen button for MLS gallery */
.gallery-fullscreen-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.gallery-fullscreen-btn:hover {
    background: rgba(0,0,0,0.7);
}

/* Fullscreen Image Viewer Overlay */
.fullscreen-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.98);
    z-index: 2147483647;
    align-items: center;
    justify-content: center;
}

/* Ensure overlay works correctly when browser is in fullscreen mode */
.fullscreen-viewer:fullscreen,
.fullscreen-viewer:-webkit-full-screen {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
}

:fullscreen .fullscreen-viewer,
:-webkit-full-screen .fullscreen-viewer {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000 !important;
}

.fullscreen-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.2s;
    line-height: 1;
}

.fullscreen-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Fullscreen carousel - base styles */
.fullscreen-carousel {
    display: flex;
    width: 100%;
    height: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 5px;
}

.fullscreen-carousel::-webkit-scrollbar {
    display: none;
}

.fullscreen-slide {
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.fullscreen-slide img {
    object-fit: contain;
    border-radius: 4px;
}

/* Landscape mode: horizontal scroll (default) */
.fullscreen-carousel {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding: 20px 0;
    align-items: center;
}

.fullscreen-slide img {
    max-height: calc(100vh - 80px);
    max-width: calc(100vw - 40px);
}

.fullscreen-slide:first-child {
    margin-left: 20px;
}

.fullscreen-slide:last-child {
    margin-right: 20px;
}

/* Portrait mode: vertical scroll (JS adds .portrait class) */
.fullscreen-viewer.portrait .fullscreen-carousel {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    padding: 0 10px;
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    align-items: center;
}

.fullscreen-viewer.portrait .fullscreen-slide {
    width: auto;
    height: auto;
}

.fullscreen-viewer.portrait .fullscreen-slide:first-child {
    margin-left: 0;
    margin-top: 60px;
}

.fullscreen-viewer.portrait .fullscreen-slide:last-child {
    margin-right: 0;
    margin-bottom: 60px;
}

.fullscreen-viewer.portrait .fullscreen-slide img {
    max-height: 70vh;
    max-width: calc(100vw - 20px);
}

.fullscreen-viewer.portrait .fullscreen-counter {
    bottom: calc(20px + env(safe-area-inset-bottom, 0));
}

.fullscreen-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    background: rgba(0,0,0,0.6);
    padding: 10px 20px;
    border-radius: 25px;
    z-index: 10001;
}

/* Hide nav arrows on touch devices, show swipe hint */
@media (hover: none) and (pointer: coarse) {
    .carousel-btn {
        display: none;
    }

    .gallery-nav {
        display: none;
    }
}

/* ===== User Preferences UI ===== */

/* Thumbs up/down buttons in modal headers */
.modal-preference-btns {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.pref-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pref-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.pref-btn.active {
    border-color: white;
    color: white;
}

.pref-btn.like.active {
    background: rgba(236, 72, 153, 0.6);
    border-color: #ec4899;
}

.pref-btn.dislike.active {
    background: rgba(239, 68, 68, 0.6);
    border-color: #ef4444;
}

.pref-btn svg {
    width: 18px;
    height: 18px;
}

/* Welcome Back Panel */
.welcome-back-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 320px;
    max-height: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 90;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.welcome-back-panel.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.welcome-back-header {
    background: linear-gradient(135deg, #2c5530 0%, #1e3d22 100%);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-back-header h3 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.welcome-back-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.welcome-back-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.welcome-back-content {
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.welcome-back-section {
    margin-bottom: 16px;
}

.welcome-back-section:last-child {
    margin-bottom: 0;
}

.welcome-back-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.welcome-back-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.welcome-back-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.welcome-back-item:hover {
    background: #e9ecef;
}

.welcome-back-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.welcome-back-item-icon.liked {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.welcome-back-item-info {
    flex: 1;
    min-width: 0;
}

.welcome-back-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.welcome-back-item-meta {
    font-size: 0.75rem;
    color: #666;
}

.welcome-back-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-back-clear {
    font-size: 0.8rem;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.welcome-back-clear:hover {
    color: #333;
    text-decoration: underline;
}

.welcome-back-dismiss {
    font-size: 0.8rem;
    color: #16a34a;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.welcome-back-dismiss:hover {
    text-decoration: underline;
}

/* Favorites button in hamburger menu */
.favorites-menu-item,
.open-houses-menu-item {
    position: relative;
}

.favorites-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #22c55e;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .welcome-back-panel {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 70px;
    }
}

/* Preference buttons in light modal header (neighborhood modal) */
.modal-header .modal-preference-btns {
    margin-left: auto;
    margin-right: 10px;
}

.modal-header .pref-btn {
    border-color: #ddd;
    background: #f5f5f5;
    color: #666;
}

.modal-header .pref-btn:hover {
    background: #e5e5e5;
    border-color: #ccc;
    color: #333;
}

.modal-header .pref-btn.active {
    border-color: #333;
    color: #333;
}

.modal-header .pref-btn.like.active {
    background: rgba(236, 72, 153, 0.15);
    border-color: #ec4899;
    color: #db2777;
}

.modal-header .pref-btn.dislike.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #dc2626;
}

/* Preference buttons in property modal header */
.modal-header-fixed .modal-preference-btns,
.modal-header-right .modal-preference-btns {
    display: flex;
    gap: 8px;
}

.modal-header-fixed .pref-btn,
.modal-header-right .pref-btn {
    border-color: #ddd;
    background: #f5f5f5;
    color: #666;
}

.modal-header-fixed .pref-btn:hover,
.modal-header-right .pref-btn:hover {
    background: #e5e5e5;
    border-color: #ccc;
    color: #333;
}

.modal-header-fixed .pref-btn.active,
.modal-header-right .pref-btn.active {
    border-color: #333;
    color: #333;
}

.modal-header-fixed .pref-btn.like.active,
.modal-header-right .pref-btn.like.active {
    background: rgba(236, 72, 153, 0.15);
    border-color: #ec4899;
    color: #db2777;
}

.modal-header-fixed .pref-btn.dislike.active,
.modal-header-right .pref-btn.dislike.active {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #dc2626;
}

/* ===== Favorites Modal ===== */
.favorites-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 201;
}

.modal-overlay.active .favorites-modal {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.favorites-modal .modal-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.favorites-modal .modal-title {
    flex: 1;
    margin: 0;
    font-size: 1.25rem;
}

.favorites-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorites-action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #555;
    transition: all 0.2s;
}

.favorites-action-btn:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.favorites-action-btn svg {
    flex-shrink: 0;
}

/* Info icon circle */
.info-icon-circle {
    width: 18px;
    height: 18px;
    border: 2px solid #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    font-style: italic;
    font-family: Georgia, serif;
    color: #666;
}

.favorites-action-btn:hover .info-icon-circle {
    border-color: #333;
    color: #333;
}

.favorites-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.favorites-modal-footer {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
}

.favorites-clear-btn {
    padding: 8px 20px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 20px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.favorites-clear-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

/* Favorites send trigger button */
.favorites-send-trigger {
    margin-bottom: 16px;
    text-align: center;
}

.favorites-send-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.favorites-send-trigger-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.favorites-send-trigger-btn svg {
    color: #64748b;
}

/* Favorites send popup - positioned as dropdown from header */
.favorites-send-popup {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10;
    overflow: hidden;
}

.favorites-send-popup-content {
    padding: 14px;
}

.favorites-send-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.favorites-send-popup-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.favorites-send-popup-close:hover {
    color: #64748b;
}

.favorites-send-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 10px;
}

.favorites-send-input:focus {
    border-color: #0ea5e9;
}

.favorites-send-input::placeholder {
    color: #94a3b8;
}

.favorites-send-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 12px;
    cursor: pointer;
}

.favorites-send-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0ea5e9;
}

.favorites-send-btn {
    width: 100%;
    padding: 10px 16px;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.favorites-send-btn:hover {
    background: #0284c7;
}

.favorites-send-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.favorites-send-status {
    font-size: 0.8rem;
    margin-top: 8px;
    min-height: 16px;
    text-align: center;
}

.favorites-send-status.success {
    color: #16a34a;
}

.favorites-send-status.error {
    color: #dc2626;
}

/* Favorites content sections */
.favorites-section {
    margin-bottom: 20px;
}

.favorites-section:last-child {
    margin-bottom: 0;
}

.favorites-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.favorites-section-title .count {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
}

.favorites-group {
    margin-bottom: 16px;
}

.favorites-group-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid #eee;
}

/* Neighborhood group with nested properties */
.favorites-neighborhood-group {
    margin-bottom: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.favorites-neighborhood-group .favorites-list {
    border-radius: 8px 8px 0 0;
}

.favorites-neighborhood-group .favorites-neighborhood-header {
    border-radius: 8px;
}

.favorites-neighborhood-group:has(.favorites-nested-properties) .favorites-neighborhood-header {
    border-radius: 8px 8px 0 0;
}

.favorites-nested-properties {
    padding-left: 20px;
    background: #fafbfc;
    border-radius: 0 0 8px 8px;
    border-top: 1px solid #eee;
}

.favorites-nested-properties .favorites-nested-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.favorites-nested-properties .favorites-nested-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.favorites-list {
    display: flex;
    flex-direction: column;
}

.favorites-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border: 1px solid #eee;
    border-top: none;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.favorites-item:first-child {
    border-top: 1px solid #eee;
    border-radius: 8px 8px 0 0;
}

.favorites-group + .favorites-item:first-child,
.favorites-group .favorites-item:first-child {
    border-top: none;
    border-radius: 0;
}

.favorites-item:last-child {
    border-radius: 0 0 8px 8px;
}

.favorites-item:only-child {
    border-radius: 8px;
    border-top: 1px solid #eee;
}

.favorites-item:hover {
    background: #f8f9fa;
}

.favorites-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.favorites-item-icon.disliked {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.favorites-item-thumbnail {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.favorites-item-thumbnail-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #9ca3af;
    animation: pulse-placeholder 1.5s ease-in-out infinite;
}

@keyframes pulse-placeholder {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.favorites-item-info {
    flex: 1;
    min-width: 0;
}

.favorites-item-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorites-item-meta {
    font-size: 0.8rem;
    color: #666;
}

.favorites-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.favorites-empty svg {
    width: 48px;
    height: 48px;
    color: #ccc;
    margin-bottom: 16px;
}

.favorites-empty p {
    margin: 0;
    line-height: 1.5;
}

/* Favorites info tooltip */
.favorites-info-tooltip {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 360px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.favorites-info-tooltip.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.favorites-info-tooltip p {
    margin: 0 0 12px 0;
    color: #333;
    line-height: 1.5;
}

.favorites-info-tooltip p:last-of-type {
    color: #666;
    font-size: 0.9rem;
}

.favorites-info-close {
    width: 100%;
    padding: 10px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 8px;
}

.favorites-info-close:hover {
    background: #1e3d22;
}

/* Mobile adjustments for favorites modal */
@media (max-width: 768px) {
    .favorites-modal {
        width: 95%;
        max-height: 85vh;
    }
}

/* Mobile landscape mode - ensure all modals scroll properly */
@media (max-height: 500px) and (orientation: landscape) {
    .property-modal,
    .neighborhood-modal,
    .about-modal,
    .favorites-modal,
    .settings-modal,
    .contact-modal {
        max-height: 98vh !important;
        height: 98vh !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .filter-overlay {
        max-height: 98vh !important;
    }

    .property-modal .modal-body,
    .neighborhood-modal .modal-body,
    .about-modal .modal-body,
    .favorites-modal .modal-body {
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .filter-content {
        max-height: calc(98vh - 100px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Smaller header in landscape */
    .modal-header-fixed {
        padding: 8px 12px !important;
        flex-shrink: 0 !important;
    }

    /* Reduce gallery height in landscape */
    .mls-gallery-main {
        max-height: 100px !important;
    }

    /* Ensure footer doesn't get cut off */
    .favorites-modal-footer {
        flex-shrink: 0 !important;
    }
}

/* Share preferences checkbox */
.share-prefs-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    margin: 8px 0;
}

.share-prefs-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2c5530;
    cursor: pointer;
}

.share-prefs-checkbox span {
    user-select: none;
}

/* ===== Open Houses Popup ===== */
.open-houses-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    border-radius: 12px;
    padding: 0;
    width: 280px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.open-houses-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.open-houses-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: #333;
}

.open-houses-popup-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.open-houses-popup-close:hover {
    color: #666;
}

.open-houses-popup-content {
    padding: 16px;
}

.open-houses-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #333;
}

.open-houses-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8b5cf6;
    cursor: pointer;
}

.open-houses-hint {
    margin: 0 0 12px 0;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.4;
    text-align: center;
}

.open-houses-liked-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: #f8f9fa;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.open-houses-liked-btn:hover {
    background: #e9ecef;
}

.open-houses-liked-btn svg {
    color: #666;
}

.open-houses-liked-btn {
    position: relative;
}

.open-houses-fav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #8b5cf6;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.open-houses-fav-badge.show {
    display: flex;
}

.open-houses-hint .inline-icon {
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
    color: #8b5cf6;
}

.open-houses-buttons {
    display: flex;
    gap: 8px;
}

.open-houses-buttons .open-houses-liked-btn,
.open-houses-see-all-btn {
    flex: 1;
    justify-content: center;
}

.open-houses-see-all-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f0f9ff;
    color: #0369a1;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.open-houses-see-all-btn:hover {
    background: #e0f2fe;
}

.open-houses-see-all-btn svg {
    color: #0369a1;
}

.open-houses-all-list {
    display: none;
    max-height: 50vh;
    overflow-y: auto;
    border-top: 1px solid #eee;
    padding: 12px 16px;
}

.open-houses-all-list.show {
    display: block;
}

.open-houses-all-list .oh-day-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: #8b5cf6;
    padding: 8px 0 6px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-top: 8px;
}

.open-houses-all-list .oh-day-header:first-child {
    margin-top: 0;
}

.open-houses-all-list .oh-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f8f8f8;
    cursor: pointer;
}

.open-houses-all-list .oh-item:hover {
    background: #fafafa;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 6px;
}

.open-houses-all-list .oh-item:last-child {
    border-bottom: none;
}

.open-houses-all-list .oh-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.open-houses-all-list .oh-thumbnail-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #9ca3af;
    animation: pulse-placeholder 1.5s ease-in-out infinite;
}

.open-houses-all-list .oh-info {
    flex: 1;
    min-width: 0;
}

.open-houses-all-list .oh-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.open-houses-all-list .oh-meta {
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.open-houses-all-list .oh-time {
    font-size: 0.75rem;
    color: #8b5cf6;
    font-weight: 500;
    white-space: nowrap;
}

.open-houses-all-list .oh-liked-indicator {
    color: #8b5cf6;
    flex-shrink: 0;
    margin-left: 4px;
}

.open-houses-all-list .oh-empty {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    padding: 20px 0;
}

.open-houses-popup.expanded {
    width: 340px;
    max-width: 95%;
}

/* ===== Todd Represent Popup ===== */
.todd-represent-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: white;
    border-radius: 12px;
    padding: 24px;
    width: 320px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 350;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.todd-represent-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.todd-represent-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.todd-represent-close:hover {
    color: #666;
}

.todd-represent-popup p {
    margin: 0 0 12px 0;
    color: #333;
    line-height: 1.5;
}

.todd-represent-popup p:last-of-type {
    color: #666;
    font-size: 0.9rem;
}

.todd-represent-contact-btn {
    width: 100%;
    padding: 12px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}

.todd-represent-contact-btn:hover {
    background: #1e3d22;
}

/* ===== Confirmation Popup (positioned near click) ===== */
.confirm-popup {
    position: fixed;
    background: white;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    z-index: 400;
    min-width: 200px;
    max-width: 280px;
}

.confirm-popup p {
    margin: 0 0 14px 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.4;
}

.confirm-popup-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirm-popup-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.confirm-popup-cancel {
    background: #f0f0f0;
    color: #666;
}

.confirm-popup-cancel:hover {
    background: #e0e0e0;
}

.confirm-popup-confirm {
    background: #ef4444;
    color: white;
}

.confirm-popup-confirm:hover {
    background: #dc2626;
}

/* ===== Favorites Modal Enhancements ===== */
/* Unlike button on favorites items */
.favorites-unlike-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: auto;
}

.favorites-unlike-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Open houses section in favorites */
.favorites-open-houses {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
}

.favorites-open-houses .favorites-section-title {
    color: #7c3aed;
}

.favorites-oh-day-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7c3aed;
    padding: 8px 0 4px 0;
    margin-top: 8px;
}

.favorites-oh-day-header:first-child {
    margin-top: 0;
}

.favorites-oh-time {
    font-size: 0.75rem;
    color: #8b5cf6;
    font-weight: 600;
    white-space: nowrap;
}

.favorites-oh-time-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.favorites-add-calendar {
    font-size: 0.65rem;
    color: #8b5cf6;
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    cursor: pointer;
    white-space: nowrap;
    opacity: 0.8;
}

.favorites-add-calendar:hover {
    opacity: 1;
}

/* Have Todd represent you link */
.favorites-todd-represent {
    display: block;
    text-align: center;
    padding: 10px;
    margin-top: 8px;
    color: #2c5530;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.favorites-todd-represent:hover {
    color: #1e3d22;
}

/* ===== First Time Welcome Guide (Centered Modal) ===== */
.welcome-guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2147483647; /* Max z-index - above all drawers and modals */
    display: none;
    align-items: center;
    justify-content: center;
}

.welcome-guide-overlay.active {
    display: flex;
}

.welcome-guide-panel {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    padding: 24px;
}

.welcome-guide-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.welcome-guide-close:hover {
    background: #e5e7eb;
    color: #333;
}

.welcome-guide-title {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c5530;
    text-align: center;
}

.welcome-guide-subtitle {
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    color: #6b7280;
    text-align: center;
}

/* Screenshot container with callouts */
.welcome-screenshot-container {
    position: relative;
    margin-bottom: 20px;
}

.welcome-screenshot {
    width: 50%;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: block;
    margin: 0 auto;
}

/* Callout pointers on the screenshot */
.welcome-callout {
    position: absolute;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 180px;
}

.welcome-callout-dot {
    width: 24px;
    height: 24px;
    background: #2c5530;
    border: 3px solid white;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.welcome-callout-text {
    background: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #1f2937;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    line-height: 1.3;
}

.welcome-callout-text strong {
    color: #2c5530;
}

/* Legend below screenshot */
.welcome-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.welcome-legend-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
}

.welcome-legend-num {
    width: 22px;
    height: 22px;
    background: #2c5530;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.welcome-legend-label {
    background: #2c5530;
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.welcome-legend-text {
    font-size: 0.85rem;
    color: #374151;
    line-height: 1.4;
}

.welcome-legend-text strong {
    color: #1f2937;
}

.welcome-guide-btn {
    width: 100%;
    padding: 14px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.welcome-guide-btn:hover {
    background: #1e3d22;
}

@media (max-width: 600px) {
    .welcome-guide-panel {
        width: 95%;
        padding: 16px;
        max-height: 95vh;
    }

    .welcome-guide-title {
        font-size: 1.25rem;
    }

    .welcome-legend {
        grid-template-columns: 1fr;
    }

    .welcome-callout-text {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/* Modal subtitle row with unit number */
.modal-subtitle-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.modal-unit {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
}

.modal-subtitle-sep {
    color: #999;
    font-size: 0.75rem;
}

/* Grouped action buttons (thumbs + close) */
.modal-action-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-action-btns .modal-close {
    margin-left: 4px;
}

/* Override for pref buttons in action group */
.modal-action-btns .pref-btn {
    width: 32px;
    height: 32px;
}

.modal-action-btns .pref-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile: ensure unit is visible */
@media (max-width: 480px) {
    .modal-header-left .modal-title {
        font-size: 1rem;
    }

    .modal-subtitle-row {
        flex-wrap: nowrap;
    }

    .modal-unit {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .modal-subtitle-btn {
        font-size: 0.8rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 150px;
    }

    .modal-header-btn {
        display: none;
    }
}


/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e3a5f;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}


/* Violet checkbox for open house filter */
.violet-checkbox {
    accent-color: #8b5cf6 !important;
}

/* Open house purple dot indicator */
.open-house-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #8b5cf6;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}


/* ============================================
   AGENT DRAWER (Left Side)
   ============================================ */

.agent-drawer {
    position: fixed;
    top: calc(60px + 3%);
    left: 0;
    bottom: 3%;
    width: 0;
    z-index: 400;
    pointer-events: none;
}

/* Hide agent drawer panel when not open - visibility hidden prevents interaction */
.agent-drawer:not(.open) .agent-drawer-panel {
    visibility: hidden;
    pointer-events: none;
}

/* Collapsed tab on left edge - white style with deep shadow */
.agent-drawer-tab {
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.98);
    color: #333;
    padding: 16px 10px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow:
        3px 0 8px rgba(0, 0, 0, 0.12),
        6px 0 20px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
    pointer-events: auto;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    z-index: 401;
}

.agent-drawer-tab:hover {
    padding-right: 14px;
    box-shadow:
        4px 0 12px rgba(0, 0, 0, 0.15),
        8px 0 25px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Expanded panel */
.agent-drawer-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    background: white;
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.agent-drawer.open .agent-drawer-panel {
    transform: translateX(0);
}

.agent-drawer.open .agent-drawer-tab,
body.agent-drawer-open .agent-drawer-tab {
    opacity: 0;
    pointer-events: none;
}

/* Panel header */
.agent-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.agent-drawer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #2c5530;
}

.agent-drawer-title-icon {
    width: 22px;
    height: 22px;
}

.agent-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.agent-drawer-close:hover {
    color: #333;
}

/* Content area */
.agent-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Login view */
.agent-login-prompt {
    text-align: center;
    padding: 40px 20px;
}

.agent-login-prompt p {
    color: #666;
    margin-bottom: 20px;
}

.agent-signin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.agent-signin-btn:hover {
    background: #f8f8f8;
    border-color: #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.agent-login-note {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #888;
}

/* Pending view */
.agent-pending-prompt {
    text-align: center;
    padding: 30px 20px;
}

.agent-pending-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.agent-pending-prompt h3 {
    color: #333;
    margin-bottom: 8px;
}

.agent-pending-prompt p {
    color: #666;
    margin-bottom: 8px;
}

.agent-pending-email {
    font-weight: 500;
    color: #2c5530;
}

.agent-signout-btn {
    margin-top: 20px;
    padding: 8px 20px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.agent-signout-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* Suspended view */
.agent-suspended-prompt {
    text-align: center;
    padding: 30px 20px;
}

.agent-suspended-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.agent-suspended-prompt h3 {
    color: #333;
    margin-bottom: 8px;
}

.agent-suspended-prompt a {
    color: #2c5530;
    font-weight: 500;
}

/* Logged in view */
.agent-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.agent-user-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-user-info {
    display: flex;
    flex-direction: column;
}

.agent-user-name {
    font-weight: 500;
    color: #333;
}

.agent-signout-link {
    background: none;
    border: none;
    padding: 0;
    color: #666;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
}

.agent-signout-link:hover {
    color: #333;
    text-decoration: underline;
}

/* Tools navigation */
.agent-tools-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agent-tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.15s;
}

.agent-tool-item:hover {
    background: #f0fdf4;
    border-color: #22c55e;
}

.agent-tool-icon {
    font-size: 1.2rem;
}

.agent-tool-label {
    flex: 1;
    font-weight: 500;
}

.agent-tool-count {
    font-size: 0.85rem;
    color: #666;
    background: #e5e7eb;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Divider */
.agent-drawer-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}

/* Quick actions */
.agent-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agent-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: all 0.15s;
}

.agent-action-btn:hover:not(:disabled) {
    background: #f8f8f8;
    border-color: #2c5530;
}

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

.agent-action-icon {
    font-size: 1rem;
}

/* Portal link */
.agent-portal-link {
    display: block;
    margin-top: 20px;
    text-align: center;
    color: #2c5530;
    font-weight: 500;
    text-decoration: none;
    padding: 10px;
}

.agent-portal-link:hover {
    text-decoration: underline;
}

/* Full-screen mode */
.agent-drawer.fullscreen {
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2000;
}

.agent-drawer.fullscreen .agent-drawer-panel {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh;
    border-radius: 0;
}

.agent-drawer.fullscreen .agent-drawer-content {
    max-width: none;
    margin: 0;
}

/* Fullscreen layout: nav rail snaps left, section content fills rest */
.agent-drawer.fullscreen .agent-main-container {
    flex-direction: row;
}

.agent-drawer.fullscreen .agent-nav-rail {
    width: 200px;
    flex-shrink: 0;
    border-right: 1px solid #e5e7eb;
    border-bottom: none;
}

.agent-drawer.fullscreen .agent-section-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: none;
}

.agent-drawer.fullscreen .agent-section-body {
    max-width: 800px;
}

.agent-drawer.fullscreen .agent-drawer-tab {
    display: none !important;
}

/* Header actions */
.agent-drawer-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-drawer-fullscreen {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.agent-drawer-fullscreen:hover {
    background: #f0f0f0;
    color: #333;
}

/* Back button */
.agent-drawer-back {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    margin-right: 8px;
    border-radius: 4px;
}

.agent-drawer-back:hover {
    background: #f0f0f0;
    color: #333;
}

/* Contacts view styles */
.agent-contacts-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.agent-search-box {
    flex: 1;
    min-width: 150px;
}

.agent-search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.agent-search-box input:focus {
    outline: none;
    border-color: #2c5530;
}

.agent-contacts-actions {
    display: flex;
    gap: 8px;
}

.agent-contacts-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.agent-contacts-filters select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
}

/* Contact list */
.agent-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agent-contact-card {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.agent-contact-card:hover {
    background: #f0fdf4;
    border-color: #22c55e;
}

.agent-contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2c5530 0%, #16a34a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.agent-contact-info {
    flex: 1;
    margin-left: 12px;
    min-width: 0;
}

.agent-contact-name {
    font-weight: 500;
    color: #1e3d22;
    margin-bottom: 2px;
}

.agent-contact-email {
    font-size: 0.85rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-contact-type {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
    background: #e5e7eb;
    color: #374151;
}

.agent-contact-type.lead { background: #dbeafe; color: #1e40af; }
.agent-contact-type.prospect { background: #d1fae5; color: #065f46; }
.agent-contact-type.client { background: #fef3c7; color: #92400e; }
.agent-contact-type.partner { background: #f3e8ff; color: #6b21a8; }
.agent-contact-type.imported { background: #fecaca; color: #991b1b; }

/* Contact card with checkbox */
.agent-contact-card.selected {
    background: #ecfdf5;
    border-color: #22c55e;
}

.agent-contact-checkbox {
    margin-right: 8px;
    flex-shrink: 0;
}

.agent-contact-checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.agent-contact-main {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

/* Contacts header with select all */
.agent-contacts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f3f4f6;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.agent-select-all {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #4b5563;
}

.agent-select-all input {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.agent-contact-match-count {
    color: #059669;
    font-weight: 500;
}

/* Bulk actions bar */
.agent-bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #1e3d22 0%, #2c5530 100%);
    border-radius: 8px;
    margin-bottom: 8px;
}

.agent-bulk-count {
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    margin-right: auto;
}

.agent-bulk-select {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
}

.agent-bulk-select option {
    background: #1e3d22;
    color: white;
}

.agent-btn-danger {
    background: #dc2626 !important;
    color: white !important;
    border: none;
}

.agent-btn-danger:hover {
    background: #b91c1c !important;
}

.agent-btn-sm {
    padding: 5px 10px !important;
    font-size: 0.8rem !important;
}

/* ============================================================================
   ADAPTIVE AGENT DRAWER LAYOUT
   - Mobile: stacked menu, slides to section
   - Desktop: rail + content side by side
   ============================================================================ */

.agent-main-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 !important;
}

/* Navigation Rail */
.agent-nav-rail {
    display: flex;
    flex-direction: column;
    background: #fafafa;
    border-bottom: 1px solid #e5e7eb;
}

.agent-nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.agent-nav-user .agent-user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.agent-nav-user .agent-user-name {
    font-weight: 500;
    color: #1e3d22;
    font-size: 0.95rem;
}

.agent-nav-items {
    display: flex;
    flex-direction: column;
}

.agent-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: none;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    color: #374151;
    transition: background 0.15s;
}

.agent-nav-item:hover {
    background: #f0f0f0;
}

.agent-nav-item.active {
    background: #ecfdf5;
    color: #1e3d22;
    font-weight: 500;
}

/* Nav badge for leads count */
.agent-nav-badge {
    background: #dc2626;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.agent-nav-arrow {
    color: #9ca3af;
    font-size: 1.2rem;
}

.agent-nav-footer {
    padding: 16px;
    margin-top: auto;
    border-top: 1px solid #e5e7eb;
}

.agent-nav-footer .agent-signout-link {
    color: #666;
    font-size: 0.85rem;
}

/* Section Content */
.agent-section-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.agent-section {
    display: none;
    height: 100%;
    flex-direction: column;
}

.agent-section.active {
    display: flex;
}

.agent-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafafa;
}

.agent-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e3d22;
}

.agent-section-header-actions {
    display: flex;
    gap: 8px;
}

.agent-section-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.agent-section-contacts-body {
    display: flex;
    flex-direction: column;
}

.agent-section-contacts-body .agent-contacts-list {
    flex: 1;
    overflow-y: auto;
}

.agent-section-placeholder {
    color: #666;
    margin-bottom: 16px;
}

.agent-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.agent-feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 0.9rem;
}

.agent-feature-list li:last-child {
    border-bottom: none;
}

.agent-section-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Search input in new layout */
.agent-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.agent-search-input:focus {
    outline: none;
    border-color: #2c5530;
}

/* Leads Section */
.agent-section-leads-body {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

.agent-leads-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 16px;
}

.agent-leads-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
}

.agent-leads-tab:hover {
    color: #1e3d22;
}

.agent-leads-tab.active {
    color: #1e3d22;
    border-bottom-color: #16a34a;
    font-weight: 500;
}

.agent-leads-count {
    display: inline-block;
    background: #e5e7eb;
    color: #4b5563;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 4px;
}

.agent-leads-tab.active .agent-leads-count {
    background: #dcfce7;
    color: #16a34a;
}

.agent-leads-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.agent-leads-loading,
.agent-leads-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 0.9rem;
}

.agent-lead-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s;
}

.agent-lead-item:hover {
    background: #f9fafb;
}

.agent-lead-item.new {
    background: #fefce8;
}

.agent-lead-item.new:hover {
    background: #fef9c3;
}

.agent-lead-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #6b7280;
    flex-shrink: 0;
}

.agent-lead-item-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.agent-lead-item-content {
    flex: 1;
    min-width: 0;
}

.agent-lead-item-email {
    font-weight: 500;
    color: #1e3d22;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-lead-item-summary {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

.agent-lead-item-date {
    font-size: 0.75rem;
    color: #9ca3af;
    flex-shrink: 0;
}

/* Lead Detail View */
.agent-back-btn {
    background: none;
    border: none;
    color: #16a34a;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    margin-right: 12px;
}

.agent-back-btn:hover {
    text-decoration: underline;
}

.agent-lead-detail-body {
    padding: 16px !important;
}

.agent-lead-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.agent-lead-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #6b7280;
}

.agent-lead-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.agent-lead-name {
    font-weight: 600;
    color: #1e3d22;
    font-size: 1.1rem;
}

.agent-lead-email {
    color: #4b5563;
    font-size: 0.9rem;
}

.agent-lead-date {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 4px;
}

.agent-lead-section {
    margin-bottom: 20px;
}

.agent-lead-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agent-lead-summary {
    background: #f0fdf4;
    border-radius: 8px;
    padding: 12px;
    font-size: 0.9rem;
    color: #166534;
}

.agent-lead-favorites,
.agent-lead-neighborhoods,
.agent-lead-filters {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
}

.agent-lead-favorites-item,
.agent-lead-neighborhoods-item {
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}

.agent-lead-favorites-item:last-child,
.agent-lead-neighborhoods-item:last-child {
    border-bottom: none;
}

.agent-lead-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.agent-lead-actions .agent-btn {
    flex: 1;
}

/* Response List Section (Agent Mode) */
.agent-response-list-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.agent-response-list-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agent-response-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.agent-response-empty {
    padding: 16px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.813rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #e5e7eb;
}

.agent-response-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    margin-bottom: 6px;
}

.agent-response-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.agent-response-item-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
    flex-shrink: 0;
}

.agent-response-item-icon.neighborhood {
    background: #8b5cf6;
}

.agent-response-item-text {
    font-size: 0.813rem;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-response-item-remove {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.agent-response-item-remove:hover {
    color: #ef4444;
}

.agent-response-actions {
    display: flex;
    gap: 8px;
}

.agent-response-actions .agent-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Lead Summary Stats */
.agent-lead-summary-section {
    margin-bottom: 16px;
}

.agent-lead-stats {
    display: flex;
    gap: 12px;
}

.agent-lead-stat {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.agent-lead-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3d22;
    line-height: 1;
    margin-bottom: 4px;
}

.agent-lead-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Activity Timeline */
.agent-lead-timeline-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 16px;
}

.agent-timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.agent-timeline-header h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agent-timeline-add-note {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s ease;
}

.agent-timeline-add-note:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.agent-timeline {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    max-height: 280px;
}

.agent-timeline-empty {
    text-align: center;
    padding: 24px 16px;
    color: #9ca3af;
    font-size: 0.875rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #e5e7eb;
}

/* Timeline Item (Activity Card) */
.agent-timeline-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: border-color 0.15s ease;
}

.agent-timeline-item:hover {
    border-color: #d1d5db;
}

.agent-timeline-item:last-child {
    margin-bottom: 0;
}

.agent-timeline-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.agent-timeline-icon svg {
    width: 16px;
    height: 16px;
}

/* Timeline icon colors by type */
.agent-timeline-icon.lead-captured {
    background: #dcfce7;
    color: #16a34a;
}

.agent-timeline-icon.response-sent {
    background: #dbeafe;
    color: #2563eb;
}

.agent-timeline-icon.note-added {
    background: #fef3c7;
    color: #d97706;
}

.agent-timeline-icon.property-viewed {
    background: #f3e8ff;
    color: #9333ea;
}

.agent-timeline-icon.email-opened {
    background: #cffafe;
    color: #0891b2;
}

.agent-timeline-icon.status-changed {
    background: #f1f5f9;
    color: #475569;
}

.agent-timeline-content {
    flex: 1;
    min-width: 0;
}

.agent-timeline-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}

.agent-timeline-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agent-timeline-time {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

.agent-timeline-detail {
    font-size: 0.813rem;
    color: #6b7280;
    line-height: 1.4;
}

.agent-timeline-detail-list {
    margin: 4px 0 0 0;
    padding-left: 16px;
    color: #6b7280;
    font-size: 0.75rem;
}

.agent-timeline-detail-list li {
    margin-bottom: 2px;
}

/* Note input overlay */
.agent-note-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.agent-note-dialog {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.agent-note-dialog h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: #1f2937;
}

.agent-note-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    resize: vertical;
    margin-bottom: 12px;
}

.agent-note-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.agent-note-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Mobile: Show nav rail as menu, sections slide over */
@media (max-width: 479px) {
    .agent-nav-rail {
        flex: 1;
        overflow-y: auto;
    }

    .agent-section-content {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 10;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        display: flex;
        flex-direction: column;
    }

    .agent-section-content.active {
        transform: translateX(0);
    }

    .agent-nav-arrow {
        display: block;
    }
}

/* Desktop: Rail + content side by side */
@media (min-width: 480px) {
    .agent-main-container {
        flex-direction: row;
    }

    .agent-nav-rail {
        width: 160px;
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid #e5e7eb;
        overflow-y: auto;
    }

    .agent-nav-user {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .agent-nav-user .agent-user-photo {
        width: 48px;
        height: 48px;
    }

    .agent-nav-arrow {
        display: none;
    }

    .agent-section-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .agent-section {
        height: 100%;
    }
}

/* Inline empty state for contacts */
.agent-contacts-empty-inline {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 0.9rem;
}

/* Empty state */
.agent-contacts-empty,
.agent-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.agent-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

/* Contact detail */
.agent-contact-detail {
    padding: 0;
}

.agent-detail-section {
    margin-bottom: 20px;
}

.agent-detail-section h3 {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.agent-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.agent-detail-label {
    color: #666;
    font-size: 0.9rem;
}

.agent-detail-value {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.agent-contact-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Settings view */
.agent-settings-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.agent-settings-section h3 {
    font-size: 0.9rem;
    color: #1e3d22;
    margin-bottom: 12px;
    font-weight: 600;
}

.agent-settings-field {
    margin-bottom: 12px;
}

.agent-settings-field label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
}

.agent-settings-field input,
.agent-settings-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.agent-settings-field input:focus,
.agent-settings-field select:focus {
    outline: none;
    border-color: #2c5530;
}

.agent-settings-field input:disabled {
    background: #f5f5f5;
    color: #999;
}

.agent-settings-actions {
    margin-top: 16px;
}

/* Agent buttons */
.agent-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}

.agent-btn-primary {
    background: #2c5530;
    color: white;
}

.agent-btn-primary:hover {
    background: #1e3d22;
}

.agent-btn-secondary {
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.agent-btn-secondary:hover {
    background: #f5f5f5;
}

.agent-btn-map {
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.agent-btn-map:hover {
    background: #2563eb;
}

.agent-btn-map svg {
    flex-shrink: 0;
}

.agent-btn-danger {
    background: #dc2626;
    color: white;
}

.agent-btn-danger:hover {
    background: #b91c1c;
}

.agent-btn-full {
    width: 100%;
}

/* Lead viewing toast */
.lead-viewing-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e40af;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    font-size: 14px;
    animation: slideUp 0.3s ease;
}

.lead-viewing-toast button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.lead-viewing-toast button:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Lead viewing banner in Favorites tab */
.pl-lead-viewing-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1e40af;
    color: white;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.pl-lead-viewing-banner button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}

.pl-lead-viewing-banner button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pl-restore-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 12px;
}

.pl-restore-btn:hover {
    background: #2563eb;
}

/* Registration form */
.agent-register-form {
    padding: 0;
}

.agent-register-form h3 {
    color: #1e3d22;
    margin-bottom: 8px;
}

.agent-register-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.agent-form-group {
    margin-bottom: 16px;
}

.agent-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.agent-form-group input[type="text"],
.agent-form-group input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
}

.agent-form-group input:focus {
    outline: none;
    border-color: #2c5530;
}

.agent-checkbox-group {
    margin-top: 20px;
}

.agent-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
}

.agent-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.agent-register-form button[type="submit"] {
    margin-top: 20px;
}

.agent-register-form .agent-signout-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    color: #666;
    font-size: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
}

.agent-register-form .agent-signout-link:hover {
    color: #333;
    text-decoration: underline;
}

/* Import Contacts Modal */
.agent-import-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.agent-import-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.agent-import-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.agent-import-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e3d22;
}

.agent-import-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.agent-import-close:hover {
    color: #333;
}

.agent-import-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.agent-import-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.agent-import-dropzone:hover,
.agent-import-dropzone.dragover {
    border-color: #2c5530;
    background: #f0fdf4;
}

.agent-import-dropzone-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.agent-import-dropzone p {
    margin: 0;
    color: #666;
}

.agent-import-hint {
    font-size: 0.85rem;
    color: #999 !important;
    margin-top: 8px !important;
}

.agent-import-options {
    margin-bottom: 20px;
}

.agent-import-options h4,
.agent-import-mapping h4,
.agent-import-preview h4 {
    font-size: 0.9rem;
    color: #333;
    margin: 0 0 12px 0;
    font-weight: 600;
}

.agent-import-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

.agent-import-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.agent-import-mapping {
    margin-bottom: 20px;
}

.agent-import-mapping-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.agent-import-mapping-row label {
    width: 75px;
    font-size: 0.85rem;
    color: #666;
    flex-shrink: 0;
}

.agent-import-mapping-row select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.agent-import-preview {
    margin-bottom: 20px;
}

.agent-import-preview h4 span {
    font-weight: normal;
    color: #666;
}

.agent-import-preview-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.agent-import-preview-item {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.85rem;
}

.agent-import-preview-item:last-child {
    border-bottom: none;
}

.agent-import-preview-name {
    font-weight: 500;
    color: #333;
}

.agent-import-preview-details {
    color: #666;
    font-size: 0.8rem;
    margin-top: 2px;
}

.agent-import-preview-skip {
    opacity: 0.5;
    text-decoration: line-through;
}

.agent-import-preview-duplicate {
    color: #f59e0b;
    font-style: italic;
}

.agent-import-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.agent-import-results {
    text-align: center;
    padding: 20px;
}

.agent-import-results .success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.agent-import-results h4 {
    color: #16a34a;
    margin: 0 0 8px 0;
}

.agent-import-results p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.agent-import-results .import-stats {
    margin-top: 16px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #555;
}

/* Mobile: Agent drawer covers 95% of screen, slides from left */
@media (max-width: 767px) {
    .agent-drawer-tab {
        display: none;
    }

    .agent-drawer-panel {
        width: 95vw;  /* Use viewport width since parent has width: 0 */
        max-width: none;
    }
}

/* When drawer is open on mobile, show backdrop for closing */
@media (max-width: 767px) {
    .agent-drawer.open::before {
        content: '';
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        pointer-events: auto;
        z-index: -1;
    }
}

/* On desktop, no backdrop - map stays interactive */
@media (min-width: 768px) {
    .agent-drawer.open::before {
        display: none;
    }
}


/* ============================================
   FILTER DRAWER (Top)
   ============================================ */

.filter-drawer {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 600;
    pointer-events: none;
}

/* Handle at top edge - white style with deep shadow */
.filter-drawer-handle {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.98);
    color: #333;
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-top: 2px solid rgba(59, 130, 246, 0.5);
    box-shadow:
        0 3px 8px rgba(59, 130, 246, 0.25),
        0 6px 20px rgba(59, 130, 246, 0.12),
        0 0 12px rgba(59, 130, 246, 0.2),
        2px 0 4px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
    pointer-events: auto;
    z-index: 601;
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-handle-label {
    pointer-events: none;
}

.filter-handle-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.filter-handle-toggle input {
    display: none;
}

.filter-handle-slider {
    width: 32px;
    height: 18px;
    background: #ccc;
    border-radius: 9px;
    position: relative;
    transition: background 0.2s;
}

.filter-handle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.filter-handle-toggle input:checked + .filter-handle-slider {
    background: #16a34a;
}

.filter-handle-toggle input:checked + .filter-handle-slider::after {
    transform: translateX(14px);
}

/* Disabled toggle when no filters set */
.filter-handle-toggle input:disabled + .filter-handle-slider {
    background: #e5e7eb;
}

.filter-handle-toggle.disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.filter-drawer-handle:hover {
    padding-bottom: 12px;
    box-shadow:
        0 4px 12px rgba(59, 130, 246, 0.35),
        0 8px 25px rgba(59, 130, 246, 0.15),
        0 0 16px rgba(59, 130, 246, 0.3);
    border-top-color: rgba(59, 130, 246, 0.7);
}

/* Expanded panel */
.filter-drawer-panel {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    width: 90%;
    max-width: 700px;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    pointer-events: auto;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.filter-drawer.open .filter-drawer-panel {
    transform: translateX(-50%) translateY(0);
}

.filter-drawer.open .filter-drawer-handle {
    opacity: 0;
    pointer-events: none;
}

/* Panel header */
.filter-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 0 0;
}

.filter-drawer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c5530;
}

.filter-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.filter-drawer-close:hover {
    color: #333;
}

/* Master Toggles */
.filter-master-toggles {
    display: flex;
    gap: 24px;
    padding: 12px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.filter-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #333;
}

.filter-toggle input {
    display: none;
}

.filter-toggle-slider {
    width: 36px;
    height: 20px;
    background: #ccc;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
}

.filter-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.filter-toggle input:checked + .filter-toggle-slider {
    background: #2c5530;
}

.filter-toggle input:checked + .filter-toggle-slider::after {
    transform: translateX(16px);
}

.filter-toggle-label {
    font-weight: 500;
}

/* Filter body */
.filter-drawer-body {
    padding: 16px 20px;
    max-height: calc(80vh - 200px);
    overflow-y: auto;
}

/* Section headers */
.filter-section-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    margin-top: 4px;
}

/* Chip-style select dropdowns */
.filter-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.filter-chip-group {
    flex: 1;
    min-width: 90px;
}

.filter-chip-select {
    width: 100%;
    padding: 8px 28px 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    font-size: 0.8rem;
    color: #333;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.15s;
}

.filter-chip-select:hover {
    border-color: #2c5530;
}

.filter-chip-select:focus {
    outline: none;
    border-color: #2c5530;
    box-shadow: 0 0 0 2px rgba(44, 85, 48, 0.1);
}

/* Selected state for chip selects */
.filter-chip-select.has-value {
    background-color: #e8f5e9;
    border-color: #2c5530;
    color: #2c5530;
    font-weight: 500;
}

/* Divider */
.filter-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}

/* STR options */
.filter-str-options {
    display: flex;
    gap: 16px;
    margin: 8px 0 12px 0;
    padding-left: 4px;
}

.filter-checkbox-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #555;
    cursor: pointer;
}

.filter-checkbox-compact input {
    width: 14px;
    height: 14px;
    accent-color: #2c5530;
}

/* Multi-select dropdown */
.filter-multiselect-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.filter-multiselect {
    position: relative;
    flex: 1;
}

.filter-multiselect-trigger {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-multiselect-trigger:hover {
    border-color: #2c5530;
}

.filter-multiselect-label {
    flex: 1;
    font-size: 0.85rem;
    color: #333;
}

.filter-multiselect-count {
    padding: 2px 8px;
    background: #2c5530;
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 8px;
    display: none;
}

.filter-multiselect-count.visible {
    display: inline;
}

.filter-multiselect-arrow {
    color: #666;
    transition: transform 0.2s;
}

.filter-multiselect.open .filter-multiselect-arrow {
    transform: rotate(180deg);
}

.filter-multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.filter-multiselect.open .filter-multiselect-dropdown {
    display: block;
}

.filter-multiselect-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
}

.filter-multiselect-option:hover {
    background: #f5f5f5;
}

.filter-multiselect-option input {
    width: 16px;
    height: 16px;
    accent-color: #2c5530;
}

.filter-multiselect-option span {
    font-size: 0.85rem;
    color: #333;
}

.filter-multiselect-option input:disabled + span {
    color: #999;
}

.filter-hint {
    font-size: 0.75rem;
    color: #888;
    white-space: nowrap;
}

/* Actions */
.filter-drawer-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.filter-drawer-actions .filter-clear-btn {
    flex: 1;
    padding: 10px 16px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-drawer-actions .filter-clear-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.filter-drawer-actions .filter-apply-btn {
    flex: 2;
    padding: 10px 16px;
    background: #2c5530;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-drawer-actions .filter-apply-btn:hover {
    background: #1e3d22;
}

/* When drawer is open, show backdrop */
.filter-drawer.open::before {
    content: '';
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    z-index: -1;
}

/* Mobile adjustments for filter drawer */
@media (max-width: 767px) {
    .filter-drawer-panel {
        width: 100%;
        max-width: none;
        border-radius: 0 0 12px 12px;
        max-height: 80vh;
    }

    .filter-drawer-content .filter-row {
        flex-direction: column;
    }

    .filter-drawer-content .filter-section-half {
        width: 100%;
    }
}


/* ============================================
   DISPLAY DRAWER (Bottom)
   ============================================ */

.display-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    pointer-events: none;
}

/* Handle at bottom edge */
.display-drawer-handle {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.5);
    box-shadow:
        0 -2px 10px rgba(59, 130, 246, 0.25),
        0 0 12px rgba(59, 130, 246, 0.2);
    transition: all 0.2s;
    pointer-events: auto;
    z-index: 501;
}

.display-drawer-handle:hover {
    padding-top: 14px;
    box-shadow:
        0 -4px 15px rgba(59, 130, 246, 0.35),
        0 0 16px rgba(59, 130, 246, 0.3);
    border-bottom-color: rgba(59, 130, 246, 0.7);
}

.display-handle-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
}

.display-handle-dots {
    display: flex;
    gap: 6px;
}

.display-handle-dots .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Expanded panel */
.display-drawer-panel {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    pointer-events: auto;
}

.display-drawer.open .display-drawer-panel {
    transform: translateX(-50%) translateY(0);
}

.display-drawer.open .display-drawer-handle {
    opacity: 0;
    pointer-events: none;
}

/* Panel header */
.display-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.display-drawer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.display-drawer-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.display-drawer-close:hover {
    color: #333;
}

/* Columns layout */
.display-columns {
    display: flex;
    padding: 16px 20px;
    gap: 30px;
}

.display-column {
    flex: 1;
}

.display-column-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Options */
.display-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    transition: opacity 0.15s;
}

.display-option:hover {
    opacity: 0.8;
}

.display-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.display-label {
    font-size: 0.9rem;
    color: #333;
}

.display-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* Filters toggle special styling */
.filters-toggle {
    background: #f9fafb;
    margin: 0 -10px;
    padding: 10px !important;
    border-radius: 6px;
}

.filters-status {
    margin-left: auto;
    font-size: 0.8rem;
    color: #666;
    padding: 2px 8px;
    background: #e5e7eb;
    border-radius: 4px;
}

.filters-toggle input:checked + .display-label + .filters-status {
    background: #dcfce7;
    color: #166534;
}

/* When drawer is open, show backdrop */
.display-drawer.open::before {
    content: '';
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: auto;
    z-index: -1;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .display-drawer-panel {
        width: 100%;
        max-width: none;
        border-radius: 12px 12px 0 0;
    }

    .display-columns {
        flex-direction: column;
        gap: 20px;
    }
}


/* ============================================
   LISTINGS HANDLE (Right Side)
   ============================================ */

.listings-handle {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.98);
    color: #333;
    padding: 16px 10px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow:
        -3px 0 8px rgba(59, 130, 246, 0.3),
        -6px 0 20px rgba(59, 130, 246, 0.15),
        0 0 12px rgba(59, 130, 246, 0.25);
    transition: all 0.2s;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    z-index: 401;
    border-left: 2px solid rgba(59, 130, 246, 0.5);
}

.listings-handle:hover {
    padding-left: 14px;
    box-shadow:
        -4px 0 12px rgba(59, 130, 246, 0.4),
        -8px 0 25px rgba(59, 130, 246, 0.2),
        0 0 16px rgba(59, 130, 246, 0.35);
    border-left-color: rgba(59, 130, 246, 0.7);
}

/* Mobile: Listings handle triggers 95% width sidebar from right */
@media (max-width: 767px) {
    .listings-handle {
        padding: 14px 8px;
        font-size: 0.75rem;
    }

    /* When properties sidebar opens on mobile, it covers 95% */
    .properties-list-overlay.sidebar-mode .properties-list-modal {
        width: 95%;
        max-width: none;
    }
}


/* ============================================
   DRAWER RESIZE HANDLES
   ============================================ */

.drawer-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.drawer-resize-left {
    left: 0;
}

.drawer-resize-right {
    right: 0;
}

.resize-grip {
    width: 4px;
    height: 40px;
    background: #3b82f6;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
    transition: all 0.2s ease;
}

.drawer-resize-handle:hover .resize-grip {
    background: #2563eb;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.7);
}

.drawer-resize-handle:active .resize-grip {
    background: #1d4ed8;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.8);
}

/* Hide resize handles on mobile */
@media (max-width: 1023px) {
    .drawer-resize-handle {
        display: none;
    }
}


/* ============================================
   DRAWER MAP OFFSET
   ============================================ */

/* When drawers are open, shift map appropriately */
body.listings-drawer-open #map {
    /* Map JS will handle the actual bounds padding */
}

body.agent-drawer-open #map {
    /* Map JS will handle the actual bounds padding */
}
