﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    padding: 20px;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 30px;
}

/* ── Header ───────────────────────────────────────── */

header {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e8e8e8;
}

h1 {
    color: #1a2b4a;
    font-size: 2em;
    letter-spacing: 0.5px;
}

/* ── Search Section ───────────────────────────────── */

.search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

#searchType {
    padding: 12px 14px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background-color: #f9f9f9;
    color: #333;
    cursor: pointer;
    min-width: 150px;
    transition: border-color 0.2s;
}

#searchType:focus {
    outline: none;
    border-color: #1a6bb5;
}

.input-wrapper {
    position: relative;
    flex: 1;
    min-width: 220px;
}

#searchInput {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.2s;
}

#searchInput:focus {
    outline: none;
    border-color: #1a6bb5;
}

/* ── Results Dropdown ─────────────────────────────── */

.search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #1a6bb5;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.results-count {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
    background: #f9fafc;
}

#resultsList {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #e8f0fc;
}

.result-primary {
    font-size: 14px;
    font-weight: 600;
    color: #1a2b4a;
}

.result-secondary {
    font-size: 12px;
    color: #777;
}

/* ── Buttons ──────────────────────────────────────── */

button {
    padding: 12px 24px;
    font-size: 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
    white-space: nowrap;
}

button:active {
    transform: scale(0.97);
}

#searchButton {
    background-color: #1a6bb5;
    color: white;
}

#searchButton:hover {
    background-color: #155a99;
}

.btn-clear {
    background-color: #e0e0e0;
    color: #444;
}

.btn-clear:hover {
    background-color: #c8c8c8;
}

/* ── Error Message ────────────────────────────────── */

.error {
    background-color: #fff0f0;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 4px solid #c62828;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ── Main Content Grid ────────────────────────────── */

.content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
}

#map {
    height: 700px;
    border-radius: 8px;
    border: 2px solid #ddd;
}

/* ── Lot Info Panel ───────────────────────────────── */

.lot-info {
    background-color: #f9fafc;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #ddd;
    overflow-y: auto;
    max-height: 700px;
}

.lot-info h2 {
    color: #1a2b4a;
    margin-bottom: 12px;
    font-size: 1.2em;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

/* ── Directions Button ────────────────────────────── */

.directions-row {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 2px solid #e0e0e0;
}

.btn-directions {
    width: 100%;
    padding: 12px;
    background-color: #1a6bb5;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    letter-spacing: 0.3px;
}

.btn-directions:hover {
    background-color: #155a99;
}

.btn-directions:active {
    transform: scale(0.97);
}

/* ── Detail Rows ──────────────────────────────────── */

.detail-row {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.detail-label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: #1a2b4a;
    font-weight: 500;
}

.status-available {
    color: #2e7d32;
    font-weight: 700;
}

.status-sold {
    color: #c62828;
    font-weight: 700;
}

/* ── Utility ──────────────────────────────────────── */

.hidden {
    display: none !important;
}

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 900px) {
    .content {
        grid-template-columns: 1fr;
    }

    #map {
        height: 400px;
    }

    .lot-info {
        max-height: none;
    }
}

@media (max-width: 600px) {
    .search-section {
        flex-direction: column;
    }

    #searchType,
    .input-wrapper,
    button {
        width: 100%;
    }

    h1 {
        font-size: 1.5em;
    }
}