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

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

.container {
    max-width: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.header {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.title {
    font-size: 24px;
    margin-bottom: 12px;
    color: #2c3e50;
}

.title strong {
    font-size: 28px;
    color: #1e7e34;
    display: block;
    margin-bottom: 2px;
    font-family: Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 14px;
    color: #1e7e34;
    display: block;
    margin-top: 0;
    line-height: 1.2;
    text-transform: uppercase;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
}

.subtitle a {
    color: inherit;
    text-decoration: underline;
    font-weight: 400;
    transition: color 0.2s ease;
}

.subtitle a:hover {
    color: #145c27;
    text-decoration: underline;
}

.contact-line {
    display: block;
    margin-top: 2px;
    font-size: 14px;
    color: #000;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    line-height: 1.25;
    text-transform: none;
}

.category-menu {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.category-btn {
    border: 1px solid #d5dde6;
    background: #f4f8fc;
    color: #2c3e50;
    border-radius: 16px;
    font-size: 12px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.category-btn:hover {
    background: #e8f1fb;
    border-color: #8bb7e2;
}

.category-btn.active {
    background: #1f7a43;
    border-color: #1f7a43;
    color: #fff;
}

.loading-indicator {
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
    padding: 5px 0;
}

.loading-indicator.hidden {
    display: none;
}

.loading-indicator.loading-flash {
    animation: loadingPulseText 0.9s ease-in-out infinite;
}

.main-layout {
    display: flex;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.map-container {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.zoom-control {
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
}

.zoom-control label {
    font-size: 12px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.zoom-control input[type="range"] {
    width: 140px;
}

.zoom-control-desktop {
    position: absolute;
    left: 10px;
    top: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #d8e2ec;
    border-radius: 8px;
    padding: 8px 10px;
}

.zoom-control-mobile {
    display: none;
    padding: 10px 12px 4px;
    background: white;
    border-top: 1px solid #e5ebf1;
}

.map-wrapper {
    flex: 1;
    overflow: auto;
    position: relative;
    background: #f9f9f9;
    -webkit-overflow-scrolling: touch;
    touch-action: none;
}

.map-wrapper svg {
    width: 100%;
    height: auto;
    display: block;
}

.map-wrapper.loading-flash {
    animation: loadingPulseMap 0.8s ease-in-out infinite;
}

.map-wrapper.loading-flash::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: rgba(37, 123, 202, 0.16);
    animation: loadingOverlayPulse 0.8s ease-in-out infinite;
    z-index: 4;
}

.map-wrapper.loading-flash svg {
    opacity: 0.4;
}

.map-compass {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(18, 44, 71, 0.24);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.map-compass::before {
    content: "N";
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 700;
    color: #213a57;
    letter-spacing: 0.04em;
}

.map-compass-needle {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 16px solid #1f7a43;
    transform: translateY(-2px);
}

.map-legend {
    padding: 12px;
    background: white;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 12px;
}

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

.legend-button {
    border: 1px solid #d5dde6;
    background: #fff;
    border-radius: 14px;
    padding: 6px 9px;
    cursor: pointer;
}

.legend-button:hover {
    background: #f5f9fe;
}

.legend-button.active {
    border-color: #1f7a43;
    box-shadow: inset 0 0 0 1px #1f7a43;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
    border: 1px solid #999;
}

.legend-color.available {
    background-color: #2ecc71;
}

.legend-color.reserved {
    background-color: #f39c12;
}

.legend-color.prebooked {
    background-color: #9b59b6;
}

.legend-color.sold {
    background-color: #e74c3c;
}

.legend-color.unreleased {
    background-color: #95a5a6;
}

.legend-count {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: normal;
}

.details-panel {
    width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.details-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.no-selection {
    text-align: center;
    color: #95a5a6;
    font-style: italic;
    padding: 40px 10px;
}

.lot-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lot-details h2 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.lot-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    background: #ecf0f1;
}

.detail-item {
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 10px;
}

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

.detail-label {
    font-weight: bold;
    color: #7f8c8d;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    color: #2c3e50;
    margin-top: 4px;
    line-height: 1.4;
}

.detail-value.price {
    font-size: 18px;
    font-weight: bold;
    color: #27ae60;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    margin-top: 4px;
}

.status-badge.available {
    background-color: #2ecc71;
}

.status-badge.reserved {
    background-color: #f39c12;
}

.status-badge.prebooked {
    background-color: #9b59b6;
}

.status-badge.sold {
    background-color: #e74c3c;
}

.status-badge.unreleased {
    background-color: #95a5a6;
}

/* SVG Lot Styling */
svg .lot {
    cursor: pointer;
    stroke: #999;
    stroke-width: 1;
    transition: all 0.2s ease;
    fill: #f7f70f;
    paint-order: stroke fill;
    stroke-linejoin: round;
}

svg .lot:hover {
    filter: brightness(1.12) saturate(1.02);
}

svg .lot.selected {
    stroke: #2c3e50;
    stroke-width: 3;
    filter: brightness(1.15);
}

.lot-tooltip {
    max-width: 250px;
    color: #fff;
    background: #434343;
    border: 1px solid #000;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    text-align: left;
    white-space: normal;
    overflow: visible;
    font-family: Arial, "Helvetica Neue", sans-serif;
}

.lot-tooltip::before,
.lot-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
}

.lot-tooltip::before {
    bottom: -19px;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 19px solid #000;
}

.lot-tooltip::after {
    bottom: -17px;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 17px solid #434343;
}

.lot-tooltip-main {
    padding: 12px 14px 10px;
}

.lot-tooltip-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 8px;
}

.lot-tooltip-status {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 8px;
}

.lot-tooltip-name {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
}

.lot-tooltip-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 12px;
    background: #5a5a5a;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0 0 9px 9px;
}

.lot-tooltip-feature {
    display: inline-flex;
    align-items: center;
    background: #ececec;
    color: #2f2f2f;
    border: 1px solid #000;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
}

svg .lot.filtered-out {
    opacity: 0.15;
    cursor: default;
}

svg.status-focus-on .lot {
    opacity: 0.18;
    filter: saturate(0.5) brightness(1.05);
}

svg.status-focus-on .lot.status-focus-hit {
    opacity: 1;
    filter: brightness(1.02) drop-shadow(0 0 4px rgba(0, 0, 0, 0.15));
}

svg.status-focus-on .non-property-element.non-property-muted {
    opacity: 0.14;
    filter: saturate(0) brightness(1.8);
}

/* Status-based colors */
svg .lot.status-available {
    fill: #2ecc71;
}

svg .lot.status-reserved {
    fill: #f39c12;
}

svg .lot.status-prebooked {
    fill: #9b59b6;
}

svg .lot.status-sold {
    fill: #e74c3c;
}

svg .lot.status-unreleased {
    fill: #bdc3c7;
    cursor: not-allowed;
}

/* Book Button Styling */
.book-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.book-btn:hover {
    background: linear-gradient(135deg, #2980b9, #1f618d);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4);
}

.book-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

@keyframes loadingPulseText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

@keyframes loadingPulseMap {
    0%, 100% { background-color: #f9f9f9; }
    50% { background-color: #dcecff; }
}

@keyframes loadingOverlayPulse {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.55; }
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }

    .details-panel {
        width: 100%;
        max-height: 300px;
    }

    .title {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 8px;
    }

    .header {
        padding: 12px;
        margin-bottom: 8px;
    }

    .title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .category-menu {
        margin-bottom: 8px;
    }

    .category-btn {
        font-size: 11px;
        padding: 6px 8px;
    }

    .main-layout {
        gap: 8px;
    }

    .map-container {
        min-height: 31dvh;
    }

    .map-wrapper {
        min-height: 26dvh;
    }

    .zoom-control-desktop {
        display: none;
    }

    .zoom-control-mobile {
        display: flex;
    }

    .details-panel {
        max-height: 34dvh;
        min-height: 170px;
    }

    .details-content {
        padding: 15px;
    }

    .map-legend {
        padding: 10px;
        gap: 10px;
        font-size: 11px;
    }

    .legend-color {
        width: 14px;
        height: 14px;
    }

    .lot-details h2 {
        font-size: 16px;
    }

    .lot-image {
        height: 140px;
    }
}