Files
homeproz/wp-content/themes/homeproz/template-parts/property/mobile-map.scss
T
root 57b752f54e Manual property enhancements: MLS status sync, agent clone, description formatting
- Manual properties linked to MLS now inherit status (Active/Pending/Closed) and
  days_on_market from the MLS listing dynamically
- Properties not in MLS default to Closed status
- Clone feature now auto-populates listing agent by matching MLS ID to Agent CPT
- Description formatter detects embedded headers (unpunctuated text after sentences)
  and splits them into separate paragraphs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:28:44 +00:00

489 lines
9.8 KiB
SCSS

/**
* Mobile Map View Styles
*
* Bottom sheet interface for mobile property browsing with map
*
* @package HomeProz
*/
// Only show mobile map view below 1024px
.mobile-map-view {
display: none;
@media (max-width: 1023px) {
display: block;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 50;
}
}
// Hide desktop-only elements on mobile
.desktop-only {
@media (max-width: 1023px) {
display: none !important;
}
}
// Full-screen map container
.mobile-map-container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: var(--color-bg-dark);
// Leaflet map fills container
.leaflet-container {
width: 100%;
height: 100%;
}
}
// Bottom Sheet
.mobile-bottom-sheet {
position: absolute;
left: 0;
right: 0;
bottom: 0;
background-color: var(--color-bg-dark);
border-radius: 1rem 1rem 0 0;
border-top: 3px solid var(--color-accent);
box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
z-index: 1000; // Must be higher than Leaflet controls (800)
display: flex;
flex-direction: column;
transition: height 0.3s ease-out;
will-change: height;
max-height: calc(100vh - 60px); // Leave space for map peek
// Sheet states (2 states: collapsed and expanded)
&[data-state="collapsed"] {
height: 120px;
}
&[data-state="expanded"] {
height: calc(100vh - 60px);
}
// Disable transitions when dragging
&.is-dragging {
transition: none;
}
}
// Drag Handle
.sheet-drag-handle {
flex-shrink: 0;
display: flex;
justify-content: center;
align-items: center;
padding: 0.75rem;
cursor: grab;
touch-action: none;
&:active {
cursor: grabbing;
}
}
.sheet-handle-bar {
width: 36px;
height: 4px;
background-color: var(--color-border);
border-radius: 2px;
}
// Sheet Header
.sheet-header {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 1rem 0.75rem;
border-bottom: 1px solid var(--color-border);
cursor: pointer;
user-select: none;
-webkit-tap-highlight-color: transparent;
}
.sheet-property-count {
font-size: 1rem;
font-weight: 600;
color: var(--color-text);
span {
color: var(--color-accent);
}
}
.sheet-filter-toggle {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 0.75rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--color-text-muted);
background-color: var(--color-bg-dark);
border: 1px solid var(--color-border);
border-radius: 0.375rem;
cursor: pointer;
&:hover,
&.is-active {
color: var(--color-text);
border-color: var(--color-accent);
}
&.is-active {
background-color: rgba(159, 55, 48, 0.1);
}
}
// Sheet Content (scrollable area)
.sheet-content {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
overscroll-behavior: contain;
-webkit-overflow-scrolling: touch;
}
// Filters Section
.sheet-filters {
padding: 1rem;
background-color: var(--color-bg-dark);
border-bottom: 1px solid var(--color-border);
display: none; // Hidden by default
&.is-visible {
display: block;
}
}
.sheet-filters-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0.75rem;
}
.sheet-filter-item {
display: flex;
flex-direction: column;
gap: 0.25rem;
label {
font-size: 0.75rem;
font-weight: 500;
color: var(--color-text-muted);
text-transform: uppercase;
letter-spacing: 0.05em;
}
&.sheet-filter-reset {
justify-content: flex-end;
.btn {
width: 100%;
}
}
}
.sheet-filter-select {
width: 100%;
padding: 0.625rem 0.75rem;
font-size: 0.875rem;
color: var(--color-text);
background-color: var(--color-bg-card);
border: 1px solid var(--color-border);
border-radius: 0.375rem;
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' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 0.75rem center;
padding-right: 2rem;
&:focus {
outline: none;
border-color: var(--color-accent);
}
}
// Property List
.sheet-property-list {
padding: 0.75rem;
}
.sheet-property-loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 0.75rem;
padding: 2rem;
color: var(--color-text-muted);
font-size: 0.875rem;
}
// Mobile property cards (compact horizontal layout)
.sheet-property-card {
display: flex;
gap: 0.75rem;
padding: 0.75rem;
background-color: var(--color-bg-dark);
border: 1px solid var(--color-border);
border-radius: 0.5rem;
margin-bottom: 0.75rem;
text-decoration: none;
color: inherit;
&:last-child {
margin-bottom: 0;
}
&:hover,
&.is-highlighted {
border-color: var(--color-accent);
}
&.is-highlighted {
background-color: rgba(159, 55, 48, 0.1);
}
}
.sheet-card-image {
flex-shrink: 0;
width: 100px;
height: 80px;
background-color: var(--color-bg-card);
background-size: cover;
background-position: center;
border-radius: 0.375rem;
position: relative;
overflow: hidden;
&.is-loading {
display: flex;
align-items: center;
justify-content: center;
}
}
.sheet-card-badge {
position: absolute;
top: 0.25rem;
left: 0.25rem;
padding: 0.125rem 0.375rem;
font-size: 0.625rem;
font-weight: 600;
text-transform: uppercase;
border-radius: 0.25rem;
background-color: var(--color-active);
color: white;
&.badge-pending {
background-color: var(--color-pending);
}
&.badge-sold {
background-color: var(--color-sold);
}
}
.sheet-card-content {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
justify-content: center;
}
.sheet-card-price {
font-size: 1rem;
font-weight: 700;
color: var(--color-text);
margin-bottom: 0.125rem;
}
.sheet-card-address {
font-size: 0.8125rem;
color: var(--color-text-muted);
margin-bottom: 0.25rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sheet-card-specs {
display: flex;
gap: 0.75rem;
font-size: 0.75rem;
color: var(--color-text-muted);
span {
display: flex;
align-items: center;
gap: 0.25rem;
}
}
// Empty state
.sheet-no-properties {
text-align: center;
padding: 2rem 1rem;
color: var(--color-text-muted);
svg {
width: 48px;
height: 48px;
margin-bottom: 1rem;
opacity: 0.5;
}
p {
margin: 0;
font-size: 0.9375rem;
}
}
// Map marker popup (simplified for mobile)
.mobile-map-popup {
.leaflet-popup-content-wrapper {
background-color: var(--color-bg-card);
border-radius: 0.5rem;
padding: 0;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.leaflet-popup-content {
margin: 0;
min-width: 200px;
}
.leaflet-popup-tip {
background-color: var(--color-bg-card);
}
}
.mobile-popup-card {
padding: 0.75rem;
}
.mobile-popup-price {
font-size: 1rem;
font-weight: 700;
color: var(--color-text);
margin-bottom: 0.25rem;
}
.mobile-popup-address {
font-size: 0.8125rem;
color: var(--color-text-muted);
margin-bottom: 0.5rem;
}
.mobile-popup-link {
display: inline-flex;
align-items: center;
gap: 0.25rem;
font-size: 0.8125rem;
font-weight: 600;
color: var(--color-accent);
text-decoration: none;
&:hover {
color: var(--color-accent-light);
}
}
// Spinner (reuse existing)
.spinner {
width: 24px;
height: 24px;
border: 2px solid var(--color-border);
border-top-color: var(--color-accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
// Custom map markers
.mobile-marker {
background: none;
border: none;
}
.mobile-marker-inner {
display: flex;
align-items: center;
justify-content: center;
padding: 0.25rem 0.5rem;
background-color: var(--color-bg-card);
border: 2px solid var(--color-accent);
border-radius: 0.25rem;
color: var(--color-text);
font-size: 0.75rem;
font-weight: 700;
white-space: nowrap;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
&::after {
content: '';
position: absolute;
bottom: -6px;
left: 50%;
transform: translateX(-50%);
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid var(--color-accent);
}
}
.mobile-cluster-marker {
background: none;
border: none;
}
.mobile-cluster-inner {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
background-color: var(--color-accent);
border: 3px solid rgba(255, 255, 255, 0.8);
border-radius: 50%;
color: white;
font-size: 0.875rem;
font-weight: 700;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
// Adjust layout when mobile map is active
@media (max-width: 1023px) {
// When mobile map view exists, hide header/footer for full-screen map
body:has(.mobile-map-view) {
.site-header {
display: none;
}
.site-footer {
display: none;
}
.site-main {
padding: 0;
}
}
}