/*
 * 360 Dublin Languages: language switcher.
 *
 * Header (context="header"): copies the per-widget values Elementor
 * generates for the header icon lists 2695d8a "Dame St, Dublin" and
 * 3fa2d3a "Accessibility" (uploads/elementor/css/post-63.css) plus the
 * kit text line height (post-5.css). Measured in Chromium on 16 Oct 2026:
 * 18px icon with a 4.5px gap, 5px text indent, field-gothic 400 16px on a
 * 24px line, white, no hover colour (the widgets set none).
 *
 * Menu (context="menu"): copies popup 67's Accessibility list 30cf893
 * (post-67.css): 32px icon, 8px + 14px gap, field-gothic 500 23px on a
 * 24px line, black, 44px rows.
 *
 * Every size carries the large-screen growth, calc(Npx + N * var(--d360-g)).
 *
 * Base values sit inside :where() (no specificity), so the header's own
 * phone rules in post-63.css ([data-id="38872a6"] ...: 13px icons, 11px
 * text, no margins) win over them exactly as they win over the Elementor
 * values of the two widgets beside the switcher.
 */

/* Shared ------------------------------------------------------------------ */

.d360-lang-switcher {
    --d360-lang-line: var(--e-global-typography-text-line-height, calc(24px + 24 * var(--d360-g, 0px)));
    position: relative;
}

:where(.d360-lang-switcher) .elementor-icon-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

:where(.d360-lang-switcher) .elementor-icon-list-item {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.d360-lang-switcher__disclosure {
    position: relative;
}

.d360-lang-switcher__toggle {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    list-style: none;
    transition: color 0.3s;
}

.d360-lang-switcher__toggle::-webkit-details-marker {
    display: none;
}

.d360-lang-switcher__toggle::marker {
    content: "";
}

:where(.d360-lang-switcher) .elementor-icon-list-icon {
    position: relative;
    top: var(--icon-vertical-offset, initial);
    display: flex;
}

:where(.d360-lang-switcher) .elementor-icon-list-icon svg {
    width: var(--e-icon-list-icon-size, 1em);
    height: var(--e-icon-list-icon-size, 1em);
    margin: 0 calc(var(--e-icon-list-icon-size, 1em) * 0.25) 0 0;
    fill: currentColor;
    transition: fill 0.3s;
}

:where(.d360-lang-switcher) .elementor-icon-list-text {
    align-self: center;
    padding-inline-start: 5px;
    transition: color 0.3s;
}

/* Open state: the current language is underlined while its list shows. */
.d360-lang-switcher__disclosure[open] > .d360-lang-switcher__toggle .elementor-icon-list-text {
    text-decoration-line: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
}

.d360-lang-switcher__menu {
    list-style: none;
    margin: 0;
}

.d360-lang-switcher .d360-lang-switcher__menu > li {
    margin: 0;
    padding: 0;
}

/*
 * The header's phone rule "[data-id="38872a6"] .elementor-icon-list-item a"
 * sets margin and padding to 0 !important and reaches these links too, so
 * the box model here needs !important at a higher specificity.
 */
.d360-lang-switcher .d360-lang-switcher__menu > li > a {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    margin: 0 !important;
    text-decoration: none;
    white-space: nowrap;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
}

@media (hover: hover) {
    .d360-lang-switcher .d360-lang-switcher__menu > li > a:hover {
        text-decoration-line: underline;
    }
}

.d360-lang-switcher .d360-lang-switcher__toggle:focus-visible,
.d360-lang-switcher .d360-lang-switcher__menu > li > a:focus-visible {
    outline: 2px solid currentColor;
}

.d360-lang-switcher .d360-lang-switcher__toggle:focus-visible {
    outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
    .d360-lang-switcher__disclosure[open] > .d360-lang-switcher__menu {
        animation: d360-lang-open 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

@keyframes d360-lang-open {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
}

/* Header ------------------------------------------------------------------ */

.d360-lang-switcher--header {
    --e-icon-list-icon-size: calc(18px + 18 * var(--d360-g, 0px));
    --icon-vertical-offset: 0px;
}

:where(.d360-lang-switcher--header) .elementor-icon-list-items.elementor-inline-items {
    display: flex;
    flex-wrap: wrap;
    margin-inline: calc(-24px / 2);
}

:where(.d360-lang-switcher--header) .elementor-icon-list-items.elementor-inline-items .elementor-icon-list-item {
    margin-inline: calc(24px / 2);
}

.d360-lang-switcher--header .d360-lang-switcher__toggle {
    font-family: "field-gothic", Sans-serif;
    font-size: calc(16px + 16 * var(--d360-g, 0px));
    font-weight: 400;
    line-height: var(--d360-lang-line);
    color: #FFFFFF;
}

/* A 44px tall hit area that leaves the 24px line box, and so the row, as it is. */
.d360-lang-switcher--header .d360-lang-switcher__toggle::after {
    content: "";
    position: absolute;
    inset: -10px -6px;
}

.d360-lang-switcher--header .d360-lang-switcher__menu {
    position: absolute;
    z-index: 10;
    top: calc(100% + 12px);
    inset-inline-end: 0;
    min-width: max(100%, calc(168px + 168 * var(--d360-g, 0px)));
    box-sizing: border-box;
    padding: 4px 0;
    background-color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/*
 * Every container in the header gets z-index 999 (the header's --z-index
 * inherits), so the button row below, later in the source, would paint
 * over the open list. Lift the switcher's own container while it is open.
 */
.e-con:has(> .elementor-widget-shortcode .d360-lang-switcher__disclosure[open]) {
    z-index: 1000;
}

.d360-lang-switcher--header .d360-lang-switcher__menu > li > a {
    padding: 0 16px !important;
    font-family: "field-gothic", Sans-serif;
    font-size: calc(16px + 16 * var(--d360-g, 0px));
    font-weight: 400;
    line-height: var(--d360-lang-line);
    color: #FFFFFF;
}

.d360-lang-switcher--header .d360-lang-switcher__menu > li > a:focus-visible {
    outline-offset: -4px;
}

.d360-lang-switcher--header ::selection {
    background-color: #FFFFFF;
    color: #000000;
}

/*
 * The header gives its two icon-list widgets "width: auto !important" on
 * phones ([data-id="38872a6"] > .elementor-widget-icon-list); the Shortcode
 * widget holding the switcher gets the same.
 */
@media (max-width: 767px) {
    .e-con > .elementor-widget-shortcode:has(.d360-lang-switcher--header) {
        width: auto !important;
    }
}

/* Menu popup -------------------------------------------------------------- */

.d360-lang-switcher--menu {
    --e-icon-list-icon-size: calc(32px + 32 * var(--d360-g, 0px));
    --icon-vertical-offset: 0px;
}

.d360-lang-switcher--menu .d360-lang-switcher__toggle {
    min-height: 44px;
    font-family: "field-gothic", Sans-serif;
    font-size: calc(23px + 23 * var(--d360-g, 0px));
    font-weight: 500;
    line-height: var(--d360-lang-line);
    color: #000000;
}

:where(.d360-lang-switcher--menu) .elementor-icon-list-icon {
    padding-inline-end: 14px;
}

/* In flow, so it pushes the rest of the menu down; links start on the text column. */
.d360-lang-switcher--menu .d360-lang-switcher__menu {
    position: static;
    padding: 0 0 0 calc(var(--e-icon-list-icon-size) * 1.25 + 14px + 5px);
}

.d360-lang-switcher--menu .d360-lang-switcher__menu > li > a {
    padding: 0 !important;
    font-family: "field-gothic", Sans-serif;
    font-size: calc(23px + 23 * var(--d360-g, 0px));
    font-weight: 500;
    line-height: var(--d360-lang-line);
    color: #000000;
}

.d360-lang-switcher--menu .d360-lang-switcher__menu > li > a:focus-visible {
    outline-offset: 2px;
}

/* Nothing to switch to: hide the widget so the row keeps its spacing. */
.elementor-widget-shortcode:has(.d360-lang-switcher-empty) {
    display: none;
}
