/* =========================================================
   Meeting Minutes — Front-End Styles
   ADA-Compliant · Mobile-Responsive
   ========================================================= */

/* ---------- Container ---------- */
.mm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1a1a1a;
    line-height: 1.5;
}

/* ---------- Filter Form ---------- */
.mm-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}
.mm-filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
}
.mm-filters input[type="search"],
.mm-filters select {
    padding: 10px 14px;
    font-size: 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    color: #1a1a1a;
    min-height: 44px; /* ADA touch target */
    transition: border-color 0.2s, box-shadow 0.2s;
}
.mm-filters input[type="search"]:focus,
.mm-filters select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
    outline: none;
}
.mm-filters input[type="search"] {
    min-width: 240px;
}

/* ---------- Buttons ---------- */
.mm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    min-height: 44px; /* ADA touch target */
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.mm-btn:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.mm-btn-primary {
    background: #2563eb;
    color: #fff;
}
.mm-btn-primary:hover {
    background: #1d4ed8;
}
.mm-btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #d1d5db;
}
.mm-btn-secondary:hover {
    background: #f3f4f6;
    color: #374151;
}

/* ---------- Results Summary ---------- */
.mm-results-summary {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    padding: 8px 0;
}

/* ---------- Table (Desktop) ---------- */
.mm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.mm-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}
.mm-table thead {
    background: #1e293b;
}
.mm-table thead th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    border-bottom: 2px solid #334155;
}
.mm-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.15s;
}
.mm-table tbody tr:nth-child(even) {
    background: #f9fafb;
}
.mm-table tbody tr:hover {
    background: #eff6ff;
}
.mm-table tbody td {
    padding: 14px 16px;
    font-size: 14px;
    vertical-align: middle;
}
.mm-col-icon {
    width: 44px;
    text-align: center;
}
.mm-col-date {
    white-space: nowrap;
    width: 120px;
}
.mm-col-type {
    width: 140px;
}
.mm-col-download {
    width: 120px;
}

/* ---------- Icons ---------- */
.mm-icon svg {
    display: block;
}

/* ---------- Badges ---------- */
.mm-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
    /* Default */
    background: #e5e7eb;
    color: #374151;
}
.mm-badge-regular {
    background: #dbeafe;
    color: #1e40af;
}
.mm-badge-emergency {
    background: #fee2e2;
    color: #991b1b;
}
.mm-badge-public-hearing {
    background: #fef3c7;
    color: #92400e;
}

/* ---------- Download Link ---------- */
.mm-download-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    border: 1px solid #2563eb;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    min-height: 36px;
}
.mm-download-link:hover,
.mm-download-link:focus {
    background: #2563eb;
    color: #fff;
}
.mm-download-link:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.mm-download-link svg {
    flex-shrink: 0;
}

/* ---------- No Results ---------- */
.mm-no-results {
    text-align: center;
    padding: 48px 16px;
    color: #6b7280;
    font-size: 16px;
}

/* ---------- Pagination ---------- */
.mm-pagination {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}
.mm-pagination ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.mm-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
}
.mm-pagination a:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}
.mm-pagination a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
.mm-pagination a.mm-current {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ---------- Cards (Mobile — Hidden on Desktop) ---------- */
.mm-cards {
    display: none;
}

/* ---------- Screen Reader Only ---------- */
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================================================
   RESPONSIVE — Mobile
   ========================================================= */

@media screen and (max-width: 768px) {
    /* Hide table, show cards */
    .mm-table-wrap {
        display: none;
    }
    .mm-cards {
        display: block;
    }

    /* Filter stacking */
    .mm-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .mm-filter-group {
        width: 100%;
    }
    .mm-filters input[type="search"],
    .mm-filters select {
        width: 100%;
        min-width: 0;
    }
    .mm-filter-group:last-child {
        flex-direction: row;
    }
    .mm-btn {
        flex: 1;
    }

    /* Card styles */
    .mm-card {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    }
    .mm-card-header {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 10px;
    }
    .mm-card-meta {
        flex: 1;
    }
    .mm-card-title {
        margin: 0 0 2px;
        font-size: 16px;
        font-weight: 600;
        color: #1a1a1a;
    }
    .mm-card-date {
        font-size: 13px;
        color: #6b7280;
    }
    .mm-card-desc {
        font-size: 14px;
        color: #4b5563;
        margin: 0 0 12px;
    }
    .mm-card .mm-download-link {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 14px;
    }
}

/* =========================================================
   HIGH CONTRAST / REDUCED MOTION — ADA
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .mm-table tbody tr,
    .mm-btn,
    .mm-download-link,
    .mm-filters input,
    .mm-filters select,
    .mm-pagination a {
        transition: none;
    }
}

@media (forced-colors: active) {
    .mm-badge {
        border: 1px solid currentColor;
    }
    .mm-download-link {
        border: 2px solid currentColor;
    }
    .mm-table thead {
        background: Canvas;
        color: CanvasText;
    }
    .mm-table thead th {
        color: CanvasText;
        border-bottom: 2px solid CanvasText;
    }
}
