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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 300;
}

.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.map-container {
    flex: 1;
    position: relative;
}

#map {
    height: 100%;
    width: 100%;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Custom marker styles */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

.custom-marker div {
    transition: transform 0.2s ease;
}

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

/* Map legend */
.map-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 1px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    font-size: 0.5em;
}

.map-legend h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 1em;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid rgba(0,0,0,0.2);
}

.details-pane {
    width: 400px;
    background-color: white;
    border-left: 1px solid #ddd;
    overflow-y: auto;
    box-shadow: -2px 0 4px rgba(0,0,0,0.1);
}

.details-content {
    padding: 1.5rem;
}

.details-content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.property-detail {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

.property-detail h3 {
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.property-detail p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.4;
}

.property-detail .price {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.1rem;
}

.property-detail .address {
    color: #2c3e50;
    font-weight: 500;
}

.google-maps-link {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #4285f4;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.google-maps-link:hover {
    background-color: #3367d6;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .details-pane {
        width: 100%;
        height: 300px;
        border-left: none;
        border-top: 1px solid #ddd;
    }
}

/* LAX marker styling */
.lax-marker {
    background: none;
    border: none;
    text-align: center;
    line-height: 25px;
}

/* LAX marker styling */
.lax-marker {
    background: none;
    border: none;
    text-align: center;
    line-height: 25px;
}

/* LAX circle styling */
.lax-circle {
    pointer-events: none;
}

/* UCR marker styling */
.ucr-marker {
    background: none;
    border: none;
    text-align: center;
    line-height: 25px;
}

/* Fullerton marker styling */
.fullerton-marker {
    background: none;
    border: none;
    text-align: center;
    line-height: 25px;
}

/* Header button styling */
.add-property-btn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 1rem;
    transition: background-color 0.3s ease;
}

.add-property-btn:hover {
    background-color: #229954;
}

.header-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

/* Property actions in details pane */
.property-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.edit-btn, .delete-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.edit-btn {
    background-color: #3498db;
    color: white;
}

.edit-btn:hover {
    background-color: #2980b9;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    overflow: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-header {
    padding: 1rem 1.5rem;
    background-color: #2c3e50;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: white;
}

#property-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
}

.cancel-btn, .save-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.cancel-btn {
    background-color: #95a5a6;
    color: white;
}

.cancel-btn:hover {
    background-color: #7f8c8d;
}

.save-btn {
    background-color: #27ae60;
    color: white;
}

.save-btn:hover {
    background-color: #229954;
}

/* Properties list styling */
.properties-list {
    margin-top: 1rem;
}

.property-list-item {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #3498db;
    cursor: pointer;
    transition: all 0.2s ease;
}
.property-list-item-fav {
    background-color: #ffcc99;
}
.property-list-item:hover {
    background-color: #e8f4f8;
    border-left-color: #2980b9;
    transform: translateX(2px);
}

.property-list-address {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.property-list-address strong {
    color: #2c3e50;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.property-list-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.property-list-price {
    color: #27ae60;
    font-weight: bold;
}

.property-list-size {
    color: #7f8c8d;
}

.property-list-notes {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: #fff3cd;
    border-left: 3px solid #ff9800;
    border-radius: 3px;
    color: #d68100;
    font-size: 0.85rem;
    font-weight: 500;
}

/* List All button */
.list-all-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: background-color 0.3s ease;
}

.list-all-btn:hover {
    background-color: #7f8c8d;
}

/* Geocoding warning and status */
.property-list-warning {
    margin-top: 0.5rem;
    padding: 0.4rem;
    background-color: #fff3cd;
    border-left: 3px solid #ff6b6b;
    border-radius: 3px;
    color: #c0392b;
    font-size: 0.8rem;
    font-weight: 500;
}

.geocoding-warning {
    padding: 0.75rem;
    margin-bottom: 1rem;
    background-color: #fff3cd;
    border-left: 4px solid #ff6b6b;
    border-radius: 4px;
    color: #c0392b;
    font-weight: 500;
}

.geocode-btn {
    background-color: #9b59b6;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    transition: background-color 0.3s ease;
}

.geocode-btn:hover {
    background-color: #8e44ad;
}

/* Rating select */
.rating-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: white;
    cursor: pointer;
}

.rating-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Small marker for 0-star properties */
.marker-small {
    transform: scale(0.5);
    transform-origin: center;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .property-actions {
        flex-direction: column;
    }
    
    .edit-btn, .delete-btn {
        width: 100%;
    }
}
