/* ==========================================================================
   Aradel — Regulatory Announcements Full Page  v1.1
   File: /wp-content/mu-plugins/aradel-regulatory-announcements-page.css
   Scoped to .ar-reg-page__* and .ar-reg-row__*

   Year tab + load more patterns copied verbatim from
   aradel-results-presentations-page.css.
   ========================================================================== */

/* ── Outer wrapper ── */
.ar-reg-page__wrapper {
    width: 100%;
}

/* ══════════════════════════════════════════════════════════════════════════
   GREY CONTENT ZONE
   ══════════════════════════════════════════════════════════════════════════ */
.ar-reg-page__section {
    width: 100%;
    background: #ffffff;
    padding-bottom: 96px;
}

@media (max-width: 1024px) {
    .ar-reg-page__section { padding-bottom: 72px; }
}

@media (max-width: 640px) {
    .ar-reg-page__section { padding-bottom: 48px; }
}

/* ── Shared inner padding — mirrors R&P exactly ── */
.ar-reg-page__filters,
.ar-reg-page__year-tabs,
.ar-reg-page__mobile-filters,
.ar-reg-page__results-header,
.ar-reg-page__list,
.ar-reg-page__load-more-wrap {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 112px;
    padding-right: 112px;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .ar-reg-page__filters,
    .ar-reg-page__year-tabs,
    .ar-reg-page__mobile-filters,
    .ar-reg-page__results-header,
    .ar-reg-page__list,
    .ar-reg-page__load-more-wrap {
        padding-left: 64px;
        padding-right: 64px;
    }
}

@media (max-width: 640px) {
    .ar-reg-page__filters,
    .ar-reg-page__year-tabs,
    .ar-reg-page__mobile-filters,
    .ar-reg-page__results-header,
    .ar-reg-page__list,
    .ar-reg-page__load-more-wrap {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* ── FILTER ROW ──────────────────────────────────────────────────────────── */
.ar-reg-page__filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 48px;
    padding-bottom: 0;
}

.ar-reg-page__filter-label {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 32px;
    letter-spacing: -0.001px;
    color: #001014;
    white-space: nowrap;
    margin-right: 4px;
}

/* Shared pill style */
.ar-reg-page__dropdown-btn,
.ar-reg-page__search-input {
    height: 41px;
    padding: 0 16px;
    border-radius: 20px;
    border: 1px solid #001014;
    background: transparent;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    color: #001014;
    cursor: pointer;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.ar-reg-page__dropdown-btn:focus-visible,
.ar-reg-page__search-input:focus-visible {
    border-color: #01303A;
    box-shadow: 0 0 0 3px rgba(1, 48, 58, 0.15);
}

.ar-reg-page__dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ar-reg-page__chevron {
    flex-shrink: 0;
    transition: transform 0.2s ease;
    color: #001014;
}

.ar-reg-page__dropdown-btn[aria-expanded="true"] .ar-reg-page__chevron {
    transform: rotate(180deg);
}

.ar-reg-page__search-group {
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}

.ar-reg-page__search-input {
    width: 100%;
    cursor: text;
}

.ar-reg-page__search-input::placeholder {
    color: rgba(0, 16, 20, 0.4);
}

/* Show results button */
.ar-reg-page__submit {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    color: #001014;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.ar-reg-page__submit:focus { outline: none; }
.ar-reg-page__submit:focus-visible {
    outline: 2px solid rgba(193, 0, 15, 0.35);
    outline-offset: 4px;
    border-radius: 999px;
}

.ar-reg-page__submit .ar-action__circle {
    border-color: #001014;
    color: #001014;
}

/* Dropdown filter group */
.ar-reg-page__filter-group {
    position: relative;
}

.ar-reg-page__dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    min-width: 220px;
    background: #fff;
    border: 1px solid #001014;
    border-radius: 12px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.ar-reg-page__dropdown-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ar-reg-page__dropdown-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    text-align: left;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    color: #001014;
    cursor: pointer;
    transition: background 0.12s ease;
}

.ar-reg-page__dropdown-option:hover {
    background: #e8e8e8;
}

.ar-reg-page__dropdown-option.is-active {
    font-weight: 700;
    color: #005A4E;
}

/* ── YEAR TABS — copied verbatim from R&P ──────────────────────────────── */
.ar-reg-page__year-tabs {
    display: flex;
    align-items: center;
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 40px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .ar-reg-page__year-tabs {
        display: none;
    }
}

.ar-reg-page__year-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    padding: 0 0 6px;
    color: #BAB8B8;
    font-family: "Nunito Sans", sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 100%;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.ar-reg-page__year-tab.is-active {
    color: #005A4E;
    border-bottom-color: #005A4E;
}

.ar-reg-page__year-tab:hover:not(.is-active) {
    color: #888;
}

/* ── MOBILE YEAR SELECT — matches R&P style ─────────────────────── */
.ar-reg-page__mobile-filters {
    display: none;
}

@media (max-width: 640px) {
    .ar-reg-page__mobile-filters {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding-top: 28px;
        padding-bottom: 28px;
    }

    /* Hide desktop filter row (dropdowns + search + show results) on mobile */
    .ar-reg-page__filters {
        display: none;
    }
}

.ar-reg-page__mobile-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ar-reg-page__mobile-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 2px solid #01303A;
    border-radius: 20px;
    padding: 14px 48px 14px 20px;
    font-family: "Nunito Sans", sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #01303A;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.ar-reg-page__mobile-select:focus {
    border-color: #C1000F;
}

.ar-reg-page__mobile-chevron {
    position: absolute;
    right: 16px;
    pointer-events: none;
    color: #01303A;
}

/* ── RESULTS HEADER ─────────────────────────────────────────────────────── */
.ar-reg-page__results-header {
    padding-top: 0;
    padding-bottom: 0;
}

.ar-reg-page__count {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 27px;
    color: #000;
    margin: 0 0 12px;
}

.ar-reg-page__count strong {
    font-weight: 700;
}

.ar-reg-page__count-divider {
    width: 100%;
    height: 1px;
    background: #A1A0A0;
    margin-bottom: 0;
}

/* ── ANNOUNCEMENT ROWS ──────────────────────────────────────────────────── */
.ar-reg-page__list {
    display: flex;
    flex-direction: column;
    padding-top: 0;
    padding-bottom: 0;
}

/* Hidden rows (JS-toggled) — !important beats display:grid on .ar-reg-row */
.ar-reg-row--hidden {
    display: none !important;
}

.ar-reg-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
        "meta  cta"
        "body  cta";
    align-items: center;
    gap: 8px 64px;
    padding: 32px 0;
}

.ar-reg-row__meta {
    grid-area: meta;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ar-reg-row__type {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1;
    color: #000;
    text-transform: uppercase;
    /* button reset */
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: color 0.18s ease;
}

.ar-reg-row__type:hover {
    color: #C1000F;
}

.ar-reg-row__sep {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #A1A0A0;
    flex-shrink: 0;
}

.ar-reg-row__date {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ar-reg-row__body {
    grid-area: body;
}

.ar-reg-row__title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 25px;
    letter-spacing: 0.01px;
    color: #000;
    margin: 0;
}

.ar-reg-row__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ar-reg-row__title a:hover {
    color: #C1000F;
}

/* ── Unified row interaction ────────────────────────────────────────────────
   Hovering anywhere on the row activates both the title and the CTA together.
   :has() handles cross-sibling focus — title focused → action lights up,
   action focused → title lights up. No JS, no nested anchors.
   ────────────────────────────────────────────────────────────────────────── */
.ar-reg-row:hover .ar-reg-row__title a,
.ar-reg-row:hover .ar-reg-row__action {
    color: #C1000F;
}

.ar-reg-row:has(.ar-reg-row__title a:focus-visible) .ar-reg-row__action,
.ar-reg-row:has(.ar-reg-row__action:focus-visible) .ar-reg-row__title a {
    color: #C1000F;
}

.ar-reg-row__cta {
    grid-area: cta;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    align-self: center;
}

/* Read more — inherits ar-action styles, sherpa colour */
.ar-reg-row__action {
    color: #001014;
    white-space: nowrap;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.ar-reg-row__action:hover {
    color: #C1000F;
}

.ar-reg-row__action .ar-action__circle {
    border-color: currentColor;
    color: inherit;
}

.ar-reg-row__divider {
    width: 100%;
    height: 1px;
    background: #E8E8E8;
}

/* Empty state */
.ar-reg-page__empty {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #888;
    text-align: center;
    padding: 64px 0;
}

/* ── LOAD MORE — copied verbatim from R&P ──────────────────────────────── */
.ar-reg-page__load-more-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding-top: 48px;
    padding-bottom: 0;
}

.ar-reg-page__load-more-label {
    font-family: "Nunito Sans", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #01303A;
}

.ar-reg-page__load-more-wrap.is-hidden {
    display: none;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ar-reg-row__title {
        font-size: 18px;
        line-height: 25px;
    }
}

@media (max-width: 768px) {
    .ar-reg-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "meta"
            "body"
            "cta";
        gap: 10px 0;
    }

    .ar-reg-row__cta {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .ar-reg-page__filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ar-reg-page__search-group {
        max-width: 100%;
        width: 100%;
    }

    .ar-reg-row__title {
        font-size: 16px;
        line-height: 25px;
    }
}
