:root {
    --bin-muted: #546e7a;
}
body {
    max-width: 900px;
    padding: 0 1.5rem;
    font-size: 1.2rem;
}
.btn-primary {
    background: var(--links);
    color: var(--background);
}
.btn-primary:hover {
    opacity: 0.85;
}
.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--background-alt);
}
.hidden {
    display: none;
}
#error {
    color: #c62828;
    font-weight: 500;
}
main > h1,
main > p {
    text-align: center;
}
#postcode-form {
    max-width: 500px;
    margin: 2rem auto;
    font-size: 1.2rem;
}
#postcode-form input {
    font-size: 1.2rem;
}
fieldset {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
fieldset select,
fieldset input {
    flex: 1;
}
#results {
    margin-top: 1rem;
}
.collection-date {
    color: #555;
    font-size: 1rem;
}

/* Screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #1565c0;
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 100;
    font-size: 0.9rem;
}
.skip-link:focus {
    left: 0;
}

/* Focus indicator */
:focus-visible {
    outline: 3px solid #1565c0;
    outline-offset: 2px;
}

/* Results actions — heading + row of calendar/copy buttons */
.results-actions {
    margin-top: 1.5rem;
    text-align: center;
}
.results-actions-heading {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--text);
    opacity: 0.75;
}
.calendar-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.action-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    min-height: 2.75rem;
    line-height: 1.2;
    border-radius: 6px;
    font-size: 1.1rem;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    background: var(--links);
    color: var(--background);
    border: 1px solid var(--links);
}
.action-btn-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}
.action-btn:hover {
    opacity: 0.85;
}

/* Bin group card */
.bin-group {
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-left: 6px solid transparent;
}
.bin-next {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.bin-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}
.bin-icon svg {
    width: 100%;
    height: 100%;
}
.bin-info {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex: 1;
    flex-wrap: wrap;
}
.bin-type {
    font-weight: 600;
    font-size: 1.3rem;
}
.bin-date {
    color: #444;
    font-size: 1.2rem;
}
.bin-relative {
    font-size: 1rem;
    color: #444;
    font-weight: 500;
    margin-left: auto;
}

/* Prevent water.css from adding backgrounds/marks to results */
#results mark,
#results article {
    all: unset;
}

/* Bin colours (data-bin-colour): the colour the API read off the council's
   label, else the stream's theme from its icon (app.js binColour).
   --bin is the bin itself, --bin-tint the card behind it. */
[data-bin-colour="black"] {
    --bin: #212121;
    --bin-tint: #e4e4e4;
}
[data-bin-colour="blue"] {
    --bin: #1e63b8;
    --bin-tint: #dbe8f7;
}
[data-bin-colour="brown"] {
    --bin: #795548;
    --bin-tint: #ece0d8;
}
[data-bin-colour="burgundy"] {
    --bin: #7b1e3a;
    --bin-tint: #f1dce2;
}
[data-bin-colour="green"] {
    --bin: #3f8a3a;
    --bin-tint: #dcefd6;
}
[data-bin-colour="grey"] {
    --bin: #8a9196;
    --bin-tint: #e9ebed;
}
[data-bin-colour="orange"] {
    --bin: #ef8a00;
    --bin-tint: #fdebd3;
}
[data-bin-colour="pink"] {
    --bin: #e0567f;
    --bin-tint: #fbe1e9;
}
[data-bin-colour="purple"] {
    --bin: #7b3fa0;
    --bin-tint: #ece0f3;
}
[data-bin-colour="red"] {
    --bin: #d32f2f;
    --bin-tint: #f9dddd;
}
[data-bin-colour="white"] {
    --bin: #ffffff;
    --bin-tint: #f7f7f7;
}
[data-bin-colour="yellow"] {
    --bin: #f2c500;
    --bin-tint: #fdf5cf;
}

.bin-group {
    background: var(--bin-tint);
    border-left-color: var(--bin);
}
/* White bins and tints need an edge to show against the card. */
.bin-group[data-bin-colour="white"] {
    border-left-color: #b0b6ba;
}
.bin-group .bin-body,
.bin-group .bin-lid {
    fill: var(--bin);
}
/* A dot per row in the bin's colour. */
.all-dates-list li::before {
    content: "";
    flex-shrink: 0;
    align-self: center;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--bin);
    box-shadow: 0 0 0 1px #b0b6ba;
}

/* All-dates accordion at the bottom */
.all-dates {
    margin-top: 0.5rem;
}
.all-dates summary {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--bin-muted);
    list-style: none;
}
.all-dates summary::-webkit-details-marker {
    display: none;
}
.all-dates summary::before {
    content: "▸ ";
}
.all-dates[open] summary::before {
    content: "▾ ";
}
.all-dates-list {
    margin: 0.25rem 0 0 0;
    padding: 0;
    list-style: none;
}
.all-dates-list li {
    font-size: 1.2rem;
    color: #444;
    padding: 0.35rem 0.5rem;
    display: flex;
    gap: 0.75rem;
    border-bottom: 1px solid #eee;
}
.all-dates-list li:last-child {
    border-bottom: none;
}
.all-dates-type {
    font-weight: 500;
    min-width: 140px;
}
