/* Styles for the regional directory. The shared site layout comes from main.css. */
.dealer-directory [hidden] { display: none !important; }
.dealer-directory :focus-visible,
header .menu :focus-visible,
header .menu_wrap:focus-visible {
    outline: 2px solid #a31d29;
    outline-offset: 2px;
}

header .menu_wrap {
    background: transparent;
    padding: 0;
}

@media (min-width: 770px) {
    header .inner > .menu > li:focus-within .second_menu,
    header .second_menu > li:focus-within .third_menu {
        display: block;
    }
    header #site-menu { display: block !important; }
}

.region-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100%, 440px);
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #d2d2d2;
}
.region-tabs a {
    padding: 8px 4px;
    color: #404040;
    text-align: center;
}
.region-tabs a + a { border-left: 1px solid #d2d2d2; }
.region-tabs a[aria-selected="true"] {
    background: #cb2835;
    color: #fff;
    text-decoration: none;
}
@media (hover: hover) {
    .region-tabs a:not([aria-selected="true"]):hover {
        background: #f8ebed;
        color: #a31d29;
        text-decoration: none;
    }
}
.region-tabs a:focus-visible { outline-offset: -3px; }

.dealer-table { table-layout: fixed; line-height: 1.5; }
.dealer-table .col-name { width: 16%; }
.dealer-table .col-phone { width: 13%; }
.dealer-table .col-address { width: 23%; }
.dealer-table .col-hours { width: 15%; }
.dealer-table .col-machines { width: 26%; }
.dealer-table .col-map { width: 7%; }
.dealer-table th:nth-child(n) { width: auto; }
.dealer-table thead tr > :last-child,
.dealer-table .location { text-align: center; }
.dealer-table tbody th {
    padding: 8px;
    color: #333;
    background: transparent;
    font-weight: bold;
}
.dealer-table tbody td,
.dealer-table tbody th { vertical-align: top; }
.dealer-table .contact { font-variant-numeric: tabular-nums; }
.dealer-table .contact a,
.dealer-table .hours { white-space: nowrap; }
.dealer-table .location img { max-width: 100%; }
.dealer-table .mobile-label { display: none; }
.dealer-table strong { font-weight: bold; }
.dealer-table .trial-label { color: #aa2230; }
.dealer-table .muted { color: #666; }
.dealer-table .models { margin: 0; overflow-wrap: anywhere; }
.dealer-table .model-groups li { display: grid; grid-template-columns: 3em minmax(0, 1fr); gap: 4px; }
.dealer-table .model-groups li > span { color: #666; }
.dealer-table .machine-info > :is(.display, .display-list) { margin-top: 5px; }
.dealer-table .display summary { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.dealer-table .display[open] > summary { margin-bottom: 4px; }

@media (max-width: 960px) and (min-width: 770px) {
    .dealer-table td, .dealer-table th { padding-inline: 5px; }
    .dealer-table .contact, .dealer-table .hours { font-size: 12px; }
}

@media (max-width: 769px) {
    .region-tabs { width: 100%; margin-bottom: 18px; }
    .region-tabs a { padding-block: 11px; }
    .dealer-table, .dealer-table tbody { display: block; }
    .dealer-table colgroup { display: none; }
    .dealer-table thead {
        display: block;
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
    .dealer-table tbody tr { padding: 15px; }
    .dealer-table tbody th { display: block; padding: 0 0 6px; border: 0; font-size: 16px; }
    .dealer-table tbody tr > td { padding-block: 3px; }
    .dealer-table .mobile-label { display: block; font-weight: bold; }
    .dealer-table :is(.contact, .address, .hours) {
        display: grid;
        grid-template-columns: 4.5em minmax(0, 1fr);
        gap: 4px;
    }
    .dealer-table .contact a { margin-top: 0; }
    .dealer-table .machines { border-top: 1px solid #ddd; margin-top: 5px; padding-top: 8px; }
    .dealer-table .location { text-align: left; }
    .dealer-table .location a { display: inline-flex; align-items: center; min-height: 32px; }
}
