/* Global styles for the espresso pod database */
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #4e342e; /* Dark coffee brown */
    color: #fff;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

.tagline {
    margin-top: 0.5rem;
    font-weight: 400;
    opacity: 0.85;
}

/* Introductory section for SEO content */
.intro {
    margin: 1rem 0;
    line-height: 1.5;
    color: #444;
}

.intro h2 {
    color: #4e342e;
    margin-top: 0;
    font-size: 1.75rem;
}

.intro p {
    margin-bottom: 1rem;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.filters {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
}

/* Individual filter group */
.filter-group {
    display: flex;
    flex-direction: column;
    font-size: 0.875rem;
}

.filter-group label {
    margin-bottom: 0.25rem;
    color: #555;
    font-weight: 600;
}

.filter-group select {
    padding: 0.3rem 0.5rem;
    font-size: 1rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    min-width: 160px;
}

.table-section {
    overflow-x: auto;
}

footer {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #666;
    border-top: 1px solid #e0e0e0;
}

footer a {
    color: #6d4c41;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/*
 * Filter button and modal styles
 *
 * A prominent filter button is shown above the table. When clicked it opens
 * a full‑screen overlay containing filter controls. This design reduces
 * clutter on small screens by hiding numerous filtering options behind
 * a single button. The modal overlay uses flexbox to center the content
 * and applies a semi‑transparent backdrop to dim the underlying page.
 */
.filter-button-container {
    margin-bottom: 1rem;
    text-align: right;
}

.filter-btn {
    background-color: #4e342e;
    color: #fff;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.filter-btn:hover {
    background-color: #6d4c41;
}

.filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

/* When the modal has the .open class it becomes visible */
.filter-modal.open {
    display: flex;
}

.filter-content {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.filter-content h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #4e342e;
}

.filter-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.apply-btn,
.reset-btn,
.close-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

.apply-btn {
    background-color: #4e342e;
    color: #ffffff;
}

.apply-btn:hover {
    background-color: #6d4c41;
}

.reset-btn {
    background-color: #757575;
    color: #ffffff;
}

.reset-btn:hover {
    background-color: #616161;
}

.close-btn {
    background-color: #bdbdbd;
    color: #ffffff;
}

.close-btn:hover {
    background-color: #9e9e9e;
}

/* DataTable customisation */
table.dataTable thead th {
    background-color: #d7ccc8; /* Light brown for headers */
    color: #333;
    font-weight: 600;
}

table.dataTable tbody tr:nth-child(even) {
    background-color: #f5f5f5;
}

table.dataTable tbody tr:hover {
    background-color: #eee;
}