/* -----------------------------------------------
   Agency Contacts Table — 2026-07-10
----------------------------------------------- */
.ac-wrap {
    margin: 0;
}
.ac-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}
.ac-filter__btn {
    display: inline-block;
    padding: 8px 50px;
    border: 2px solid var(--color-primary, #1a3a5c);
    color: var(--color-primary, #1a3a5c);
    border-radius: 999px;
    font-weight: 600;
    font-size: 1.25rem;
    font-style: normal;
    line-height: 1em;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.ac-filter__btn:hover,
.ac-filter__btn.is-active {
    background: var(--color-primary, #1a3a5c);
    color: #fff !important;
    font-style: normal;
    text-decoration: none !important;
}
.ac-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.ac-table thead tr {
    background: #4a4a4a;
    color: #fff;
}
.ac-table thead th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ac-table__section-header td {
    background: #6b6b6b;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    padding: 8px 14px;
    text-transform: uppercase;
}
.ac-table__row td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e5e5;
    vertical-align: top;
}
.ac-table__row:nth-child(even) td {
    background: #f7f7f7;
}
.ac-table__row:hover td {
    background: #eef2f7;
}
.ac-table a {
    color: var(--color-primary, #1a3a5c);
    text-decoration: none;
}
.ac-table a:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
    .ac-table thead { display: none; }
    .ac-table__row { display: block; border-bottom: 2px solid #ddd; padding: 10px 0; }
    .ac-table__row td { display: block; padding: 4px 14px; border: none; }
    .ac-table__row td::before {
        content: attr(data-label);
        font-weight: 700;
        display: block;
        font-size: 0.75rem;
        color: #888;
        text-transform: uppercase;
    }
}

.ac-table thead th {
    color: #ffffff !important;
}

/* DataTables overrides */
.ac-results .dataTables_wrapper {
    font-size: 0.95rem;
}
.ac-results .dataTables_wrapper .dataTables_length,
.ac-results .dataTables_wrapper .dataTables_filter {
    display: inline-block !important;
    float: none !important;
    margin: 0 0 12px !important;
    vertical-align: middle !important;
}
.ac-results .dataTables_wrapper .dataTables_length {
    width: 50% !important;
    text-align: left !important;
}
.ac-results .dataTables_wrapper .dataTables_filter {
    width: 49% !important;
    text-align: right !important;
}
.ac-results .dataTables_wrapper .dataTables_filter input {
    margin-left: 8px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.ac-results .dataTables_wrapper .dataTables_length select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.ac-results .dataTables_info {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #666;
    float: left !important;
}
.ac-results .dataTables_paginate {
    float: right !important;
    margin-top: 12px !important;
}
.ac-results .dataTables_paginate .paginate_button {
    display: inline-block !important;
    float: none !important;
    padding: 6px 12px !important;
    margin: 0 2px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    color: var(--color-primary, #1a3a5c) !important;
    background: #fff !important;
}
.ac-results .dataTables_paginate .paginate_button.current {
    background: var(--color-primary, #1a3a5c) !important;
    color: #fff !important;
    border-color: var(--color-primary, #1a3a5c) !important;
}
.ac-results .dataTables_paginate .paginate_button:hover {
    background: #eef2f7 !important;
    color: var(--color-primary, #1a3a5c) !important;
}
.ac-results .dataTables_paginate .paginate_button.previous::before,
.ac-results .dataTables_paginate .paginate_button.previous::after,
.ac-results .dataTables_paginate .paginate_button.next::before,
.ac-results .dataTables_paginate .paginate_button.next::after {
    display: none !important;
    content: none !important;
}

.ac-results .dataTables_paginate .paginate_button.current,
.ac-results .dataTables_paginate .paginate_button.current:hover {
    color: #ffffff !important;
}

.ac-results .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.ac-results .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #ffffff !important;
}

/* Full-width table on mobile — 2026-07-27 */
@media (max-width: 768px) {
    .ac-results .dataTables_wrapper,
    .ac-table.dataTable,
    .ac-table {
        width: 100% !important;
        max-width: 100% !important;
    }
    .ac-table.dataTable th,
    .ac-table.dataTable td {
        width: auto !important;
    }
    .ac-table__row {
        width: 100% !important;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .ac-table,
    .ac-table tbody,
    .ac-table tr,
    .ac-table td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
}

/* White form controls — 2026-07-27 */
.ac-results .dataTables_wrapper .dataTables_length select,
.ac-results .dataTables_wrapper .dataTables_filter input {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
}

/* Allow section headers to wrap — 2026-07-27 */
.ac-table__section-header td {
    white-space: normal;
    word-break: break-word;
}
