/* css/style.css */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

h1 {
    color: #00528c; /* AEC primary blue */
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    color: #007bff; /* Bootstrap primary blue */
    margin-top: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

.summary-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.summary-item {
    background-color: #e9ecef; /* Light grey */
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.summary-item h2 {
    color: #333;
    margin: 0 0 10px 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 1.2em;
}

.summary-item div {
    font-size: 1.1em;
    color: #555;
}

.party-summary p {
    margin: 5px 0;
    font-weight: bold;
}
.party-summary p span {
    font-weight: normal; /* For the vote count/percentage */
}

.positive-swing { color: green; }
.negative-swing { color: red; }

.chart-container {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

canvas {
    max-width: 100%;
    height: 400px !important; /* Fixed height for consistency */
}

.controls {
    text-align: center;
    margin-bottom: 30px;
}

.controls button {
    padding: 10px 20px;
    margin: 0 8px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.controls button:hover {
    background-color: #0056b3;
}

#last-updated {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-top: 20px;
    min-height: 1em; /* Prevent layout shift */
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 2s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}

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

.error-message {
    color: #dc3545; /* Bootstrap danger red */
    font-weight: bold;
}

#electorate-list p {
    border-bottom: 1px dashed #eee;
    padding: 10px 0;
    margin: 0;
    font-size: 0.95em;
}
#electorate-list p:last-child {
     border-bottom: none;
}