/**
 * SightMap Custom Unit List Styles
 * Styles for the custom unit list panel shown alongside the map
 * 
 * @package ApartmentAvailability
 * @since 1.0.0
 */

/* ===============  CUSTOM UNIT LIST CONTAINER  =============== */
.sightmap-custom-unit-list {
    flex: 0 0 320px;
    max-width: 320px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 600px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ===============  UNIT LIST HEADER  =============== */
.sightmap-unit-list-header {
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.sightmap-unit-list-header h3 {
    font-size: 1.45rem !important;
    font-weight: 500 !important;
}


/* ===============  LOADING & EMPTY STATES  =============== */
/* Note: Filters removed - using main archive filters instead */
.sightmap-unit-list-loading {
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.sightmap-loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid var(--sightmap-secondary-color, #007cba);
    border-radius: 50%;
    animation: sightmap-spin 1s linear infinite;
}

@keyframes sightmap-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sightmap-unit-list-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: #f9fafb;
}

.sightmap-unit-list-empty {
    margin: 12px 12px 0;
    padding: 12px 14px;
    text-align: left;
    color: #4b5563;
    font-weight: 500;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
}

.sightmap-unit-list-empty p {
    margin: 0;
}

/* ===============  UNIT LIST ITEM  =============== */
.sightmap-unit-item {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sightmap-unit-item:hover {
    border-color: var(--sightmap-secondary-color, #007cba);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sightmap-unit-item.active {
    border-color: var(--sightmap-secondary-color, #007cba);
    background: linear-gradient(to bottom, #f8fbff, #ffffff);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.08);
}

/* Unit Header - Floor Plan and Unit Number */
.sightmap-unit-header {
    margin-bottom: 8px;
}

.sightmap-unit-fp {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.2;
}

.sightmap-unit-number {
    font-size: 1rem;
    color: #111827;
    font-weight: 500;
}

/* Unit Bottom - Specs and Price */
.sightmap-unit-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.sightmap-unit-specs {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    flex: 1;
}

.sightmap-unit-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--sightmap-secondary-color, #007cba);
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}

/* ===============  RESPONSIVE  =============== */
@media (max-width: 1024px) {
    .sightmap-container {
        flex-direction: column;
    }
    
    /* Match mobile reading order on tablet: map first, unit list below */
    .sightmap-map-area {
        order: 1;
    }
    
    .sightmap-custom-unit-list {
        order: 2;
    }
    
    .sightmap-custom-unit-list {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        max-height: 400px;
        margin-bottom: 16px;
    }
}

@media (max-width: 768px) {
    .sightmap-custom-unit-list {
        border-radius: 8px;
        max-height: 350px;
    }
    
    .sightmap-unit-list-header {
        padding: 12px;
    }
    
    .sightmap-unit-list-header h3 {
        font-size: 16px;
    }
}
