/* =============================================================================
   Aradel — General Meetings
   Shortcode: [ar_general_meetings]
   Scope: .ar-gmtg-section

   Adapted from the Careers Accordion module (ar-cacc-*).
   Same measured-height accordion behaviour, same 20px border-radius language,
   same brand token values. Purpose-built for corporate investor meeting listings.
   ============================================================================= */

/* ── Box-sizing reset scoped to module ────────────────────────────────────── */

.ar-gmtg-section *,
.ar-gmtg-section *::before,
.ar-gmtg-section *::after {
    box-sizing: border-box;
}

/* ── Section wrapper ──────────────────────────────────────────────────────── */

.ar-gmtg-section {
    padding-top: 90px;
    padding-bottom: 90px;
    background: transparent;
    --ar-gmtg-motion-duration: 350ms;
    --ar-gmtg-motion-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 1024px) {
    .ar-gmtg-section {
        padding-top: 72px;
        padding-bottom: 72px;
    }
}

@media (max-width: 600px) {
    .ar-gmtg-section {
        padding-top: 48px;
        padding-bottom: 48px;
    }
}

/* ── Inner container ──────────────────────────────────────────────────────── */

.ar-gmtg-inner {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 112px;
    padding-right: 112px;
    display: flex;
    flex-direction: column;
    gap: 72px;
}

@media (max-width: 1024px) {
    .ar-gmtg-inner {
        padding-left: 64px;
        padding-right: 64px;
        gap: 56px;
    }
}

@media (max-width: 600px) {
    .ar-gmtg-inner {
        padding-left: 24px;
        padding-right: 24px;
        gap: 48px;
    }
}

/* ── Group block (Upcoming / Past) ───────────────────────────────────────── */

.ar-gmtg-group {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

@media (max-width: 600px) {
    .ar-gmtg-group {
        gap: 20px;
    }
}

/* ── Group heading (Upcoming Meetings / Past Meetings) ───────────────────── */
/*
 * Uses brand blue (#01303A) to differentiate clearly from the brand-red
 * meeting titles inside the cards. The bottom border creates a strong
 * visual anchor for each group, consistent with a professional investor table.
 */

.ar-gmtg-group-heading {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 38px;
    letter-spacing: 0.008px;
    color: #01303A;
    margin: 0;
    padding-bottom: 18px;
    border-bottom: 2px solid #01303A;
}

@media (max-width: 1024px) {
    .ar-gmtg-group-heading {
        font-size: 26px;
        line-height: 34px;
        padding-bottom: 14px;
    }
}

@media (max-width: 600px) {
    .ar-gmtg-group-heading {
        font-size: 22px;
        line-height: 30px;
        padding-bottom: 12px;
    }
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
/*
 * Shown under "Upcoming Meetings" when no upcoming entries exist.
 * Restrained — informs without being prominent.
 */

.ar-gmtg-empty {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 25px;
    color: #777;
    margin: 0;
}

/* ── Card stack ───────────────────────────────────────────────────────────── */

.ar-gmtg-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 600px) {
    .ar-gmtg-stack {
        gap: 12px;
    }
}

/* ── Single meeting card ──────────────────────────────────────────────────── */

.ar-gmtg-card {
    background: #F5F5F5;
    border-radius: 20px;
    overflow: hidden;
}

/* ── Trigger button ───────────────────────────────────────────────────────── */

.ar-gmtg-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    padding: 30px 40px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 1024px) {
    .ar-gmtg-trigger {
        padding: 26px 32px;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .ar-gmtg-trigger {
        padding: 20px 20px;
        gap: 14px;
    }
}

.ar-gmtg-trigger:focus-visible {
    outline: 2px solid #C1000F;
    outline-offset: -2px;
    border-radius: 20px;
}

/* ── Year label (trigger heading) ────────────────────────────────────────── */

.ar-gmtg-year {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 32px;
    letter-spacing: 0.004px;
    color: #01303A;
    flex: 1 1 0;
    min-width: 0;
}

@media (max-width: 1024px) {
    .ar-gmtg-year {
        font-size: 22px;
        line-height: 28px;
    }
}

@media (max-width: 600px) {
    .ar-gmtg-year {
        font-size: 18px;
        line-height: 26px;
    }
}

/* ── Chevron icon ─────────────────────────────────────────────────────────── */

.ar-gmtg-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #C1000F;
}

.ar-gmtg-icon-chevron {
    display: block;
    transition: transform var(--ar-gmtg-motion-duration) var(--ar-gmtg-motion-ease);
}

.ar-gmtg-card.is-open .ar-gmtg-icon-chevron {
    transform: rotate(180deg);
}

/* ── Second divider — between trigger and expanded panel ──────────────────── */
/*
 * Hidden when closed, fades in with a scale-from-left reveal when open.
 * Neutral grey so it separates without competing with the title divider above.
 */

.ar-gmtg-divider-expand {
    height: 1px;
    background: #e5e5e5;
    margin: 0 40px;
    transform-origin: left center;
    transform: scaleX(0);
    opacity: 0;
    transition: transform var(--ar-gmtg-motion-duration) var(--ar-gmtg-motion-ease),
                opacity   var(--ar-gmtg-motion-duration) var(--ar-gmtg-motion-ease);
}

.ar-gmtg-card.is-open .ar-gmtg-divider-expand {
    transform: scaleX(1);
    opacity: 1;
}

@media (max-width: 1024px) {
    .ar-gmtg-divider-expand {
        margin: 0 32px;
    }
}

@media (max-width: 600px) {
    .ar-gmtg-divider-expand {
        margin: 0 20px;
    }
}

/* ── Expanded panel — JS controls height (measured-height technique) ──────── */
/*
 * height is set and animated entirely by JS.
 * CSS only handles overflow, opacity transition, and [hidden] override.
 * No max-height hack — prevents the choppy timing mismatch.
 */

.ar-gmtg-panel {
    overflow: hidden;
    height: 0;
    opacity: 0;
    transition: height var(--ar-gmtg-motion-duration) var(--ar-gmtg-motion-ease),
                opacity var(--ar-gmtg-motion-duration) var(--ar-gmtg-motion-ease);
}

/* Bricks strips browser default [hidden] — restore display so JS can measure */
.ar-gmtg-panel[hidden] {
    display: block !important;
    visibility: hidden;
    height: 0 !important;
    pointer-events: none;
}

.ar-gmtg-panel:not([hidden]) {
    visibility: visible;
    pointer-events: auto;
}

.ar-gmtg-card.is-open .ar-gmtg-panel:not([hidden]) {
    opacity: 1;
}

/* ── Panel inner wrapper — JS measures scrollHeight here ─────────────────── */

.ar-gmtg-panel-inner {
    /* Padding lives in .ar-gmtg-expanded, not here */
}

/* ── Expanded content wrapper ─────────────────────────────────────────────── */

.ar-gmtg-expanded {
    padding: 32px 40px 44px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

@media (max-width: 1024px) {
    .ar-gmtg-expanded {
        padding: 28px 32px 38px;
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .ar-gmtg-expanded {
        padding: 20px 20px 30px;
        gap: 20px;
    }
}

/* ── Meeting title inside expanded panel ─────────────────────────────────── */

.ar-gmtg-meeting-title {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 26px;
    color: #111;
    margin: 0;
}

@media (max-width: 600px) {
    .ar-gmtg-meeting-title {
        font-size: 16px;
        line-height: 23px;
    }
}

/* ── Summary (wysiwyg body copy) ──────────────────────────────────────────── */

.ar-gmtg-summary p {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    color: #111;
    margin: 0 0 16px;
}

.ar-gmtg-summary p:last-child {
    margin-bottom: 0;
}

.ar-gmtg-summary a {
    color: #C1000F;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ar-gmtg-summary a:hover {
    color: #01303A;
}

.ar-gmtg-summary strong {
    font-weight: 700;
}

.ar-gmtg-summary ul,
.ar-gmtg-summary ol {
    padding-left: 20px;
    margin: 0 0 16px;
}

.ar-gmtg-summary li {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    color: #111;
    margin-bottom: 6px;
}

@media (max-width: 600px) {
    .ar-gmtg-summary p,
    .ar-gmtg-summary li {
        font-size: 16px;
        line-height: 25px;
    }
}

/* ── Documents section ────────────────────────────────────────────────────── */

.ar-gmtg-docs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ar-gmtg-docs-item {
    display: flex;
    align-items: center;
}

/* ── Related links section ────────────────────────────────────────────────── */

.ar-gmtg-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ar-gmtg-links-item {
    display: flex;
    align-items: center;
}

/* ── Notes section ────────────────────────────────────────────────────────── */

.ar-gmtg-notes {
    padding-top: 20px;
    border-top: 1px solid #ebebeb;
}

.ar-gmtg-notes p {
    font-family: "Nunito Sans", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #777;
    margin: 0 0 10px;
}

.ar-gmtg-notes p:last-child {
    margin-bottom: 0;
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .ar-gmtg-icon-chevron,
    .ar-gmtg-divider-expand,
    .ar-gmtg-panel,
    .ar-gmtg-card {
        transition: none !important;
    }
}
