/* Contacts page (/contacts/) — rendered by the [dealer_contacts] shortcode
   inside the standard content-page article. Loaded only on the contacts page.
   The two-column PAGE layout (sidebar + content) is owned by content-page.css;
   this file owns only the contacts block (info column + map). */

body.dealer-contacts-page {
    --contacts-radius: 14px;
    --contacts-border: rgba(0, 0, 0, 0.12);
    --contacts-label: rgba(0, 0, 0, 0.5);
    --contacts-icon-size: 44px;
}

.dealer-contacts {
    width: 100%;
}

/* Explicit, predictable gap under the "Контакти" page title on this page.
   `header.entry-header` (extra element) outscores the generic content-page
   `.entry-header` rule so this value reliably wins. */
body.dealer-contacts-page header.entry-header {
    margin-bottom: 30px;
}

/* The contacts block lives inside `.entry-content`, which styles generic ul/ol/a.
   These resets win over those generic rules (higher specificity) so the lists
   have NO left indent and the links/buttons are not force-underlined. */
body.dealer-contacts-page .entry-content .dealer-contacts ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.dealer-contacts-page .entry-content .dealer-contacts li {
    margin: 0;
    padding: 0;
}

.dealer-contacts__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

/* --- Info column --------------------------------------------------------- */

.dealer-contacts__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 20px;
}

.dealer-contacts__item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
}

.dealer-contacts__item-label {
    font-size: var(--font-size-micro);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--contacts-label);
}

.dealer-contacts__value {
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-light);
    line-height: 1.5;
    color: var(--color-black);
}

/* Override the generic content-page link underline inside the block. */
body.dealer-contacts-page .entry-content .dealer-contacts a.dealer-contacts__value--link {
    text-decoration: none;
    transition: color var(--motion-duration-fast) var(--motion-ease-standard);
}

body.dealer-contacts-page .entry-content .dealer-contacts a.dealer-contacts__value--link:hover,
body.dealer-focus-modality-ready.dealer-using-keyboard .dealer-contacts a.dealer-contacts__value--link:focus {
    color: var(--color-primary);
}

/* --- Channels (messengers + social) ------------------------------------- */

.dealer-contacts__channels {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: var(--border-width-thin) solid var(--contacts-border);
}

.dealer-contacts__channel-title {
    margin: 0 0 12px;
    font-size: var(--font-size-micro);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--contacts-label);
}

.dealer-contacts__icon-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 12px;
}

/* Dark circular chip: the footer SVGs are white glyphs (built for the dark
   footer), so on this light page they need a dark background to be visible. */
.dealer-contacts__icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--contacts-icon-size);
    height: var(--contacts-icon-size);
    border-radius: 50%;
    background-color: var(--color-header);
    color: var(--color-white);
    transition: background-color var(--motion-duration-fast) var(--motion-ease-standard),
                transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.dealer-contacts__icon-link:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
}

body.dealer-focus-modality-ready.dealer-using-keyboard .dealer-contacts__icon-link:focus {
    outline: var(--focus-outline-width) solid var(--color-primary);
    outline-offset: var(--focus-outline-offset);
}

.dealer-contacts__icon-image {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* --- Map ---------------------------------------------------------------- */

.dealer-contacts__map {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dealer-contacts__map-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--contacts-radius);
    overflow: hidden;
    border: var(--border-width-thin) solid var(--contacts-border);
}

.dealer-contacts__map-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* The directions CTA is the SHARED `.btn-primary` (base styles, no overrides).
   We only (a) keep it auto-width / left-aligned like a standard button and
   (b) neutralise the generic `.entry-content a` underline + hover colour that
   would otherwise leak onto it. */
.dealer-contacts__map-cta {
    align-self: start;
}

body.dealer-contacts-page .entry-content .dealer-contacts a.btn-primary,
body.dealer-contacts-page .entry-content .dealer-contacts a.btn-primary:hover,
body.dealer-contacts-page .entry-content .dealer-contacts a.btn-primary:focus {
    color: var(--color-white);
    text-decoration: none;
}

/* --- Tablet & up: info beside map --------------------------------------- */

@media (min-width: 768px) {
    .dealer-contacts__grid {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        align-items: start;
        gap: 48px;
    }
}
