:root {
    --primary-color: #0078d4;
    --background-color: #f4f4f4;
    --text-color: #333;
    --panel-bg: rgba(255, 255, 255, 0.9);
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--background-color);
    color: var(--text-color);
}

#app {
    position: relative;
    height: 100%;
    width: 100%;
}

#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

.panel {
    position: absolute;
    z-index: 10;
    background: var(--panel-bg);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#controls {
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
}

#controls fieldset {
    border: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#controls legend {
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1em;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

#controls label {
    font-size: 0.9em;
}

#controls input {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    -webkit-appearance: none; /* Fix for iOS zoom on focus */
}

#controls button {
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

#controls button:hover, #controls button:focus {
    background-color: #005a9e;
    outline: 2px solid #005a9e;
    outline-offset: 2px;
}

#info-panel {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    text-align: center;
}

#info-panel p {
    margin: 0.25rem 0;
    font-size: 1.1em;
    font-weight: 500;
}

#status {
    font-size: 0.9em;
    font-style: italic;
    color: #666;
    margin-top: 0.5rem;
}

/* Accessibility */
[aria-live="polite"] {
    /* Screen readers will announce changes, but not interrupt the user */
    assertiveness: polite;
}

/* Leaflet Overrides */
.leaflet-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
