/*
 * Aradel - Investor Market Widget
 * /wp-content/mu-plugins/aradel-investor-market-widget/assets/aradel-investor-market-widget.css
 *
 * Padding architecture — mirrors aradel-investor-grid.css exactly:
 *   .ar-imw__section   outer wrapper — carries site padding tokens (112/64/24px L/R)
 *   .ar-imw            grid shell — fills the content area, no outer padding
 *   .ar-imw__left      inner content padding (top/bottom + right gap to glass)
 *   .ar-imw__glass     inner content padding (top/bottom + left gap from left panel)
 *
 * NOTE: PHP shortcode must wrap .ar-imw in <section class="ar-imw__section">
 *
 * Right panel layers (bottom → top):
 *   .ar-imw__bg         background image
 *   .ar-imw__overlay    dark tint
 *   .ar-imw__glass      frosted-glass surface
 */

/* ══ Outer section wrapper — site padding tokens ════════════ */

.ar-imw__section {
    width: 100%;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 112px;
    padding-right: 112px;
    padding-bottom: 96px;
    box-sizing: border-box;
}

/* ══ Grid shell ═════════════════════════════════════════════ */

.ar-imw {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
}

/* ══ LEFT — Share Price ══════════════════════════════════════ */

.ar-imw__left {
    background: transparent;
    display: flex;
    align-items: flex-start;
    padding: 56px 48px;
}

.ar-imw__sp-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ar-imw__sp-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 48px;
    letter-spacing: 0.01px;
    color: #000;
    margin: 0 0 32px;
}

.ar-imw__sp-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: nowrap;
}

.ar-imw__sp-number {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 96px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.005px;
    color: #000;
}

.ar-imw__sp-currency {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 36px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 2.88px;
    text-transform: uppercase;
    color: #000;
    align-self: flex-end;
    padding-bottom: 10px;
}

.ar-imw__change {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 1.92px;
    color: #000;
    margin-bottom: 32px;
}

.ar-imw__change--up   { color: #1a7a4a; }
.ar-imw__change--down { color: #C1000F; }
.ar-imw__change--flat { color: #555;    }

.ar-imw__change-icon {
    display: flex;
    align-items: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.ar-imw__change-icon svg { width: 100%; height: 100%; }

.ar-imw__change-value,
.ar-imw__change-percent {
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 1.92px;
}

.ar-imw__sp-rule {
    width: 460px;
    max-width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.18);
    border: none;
    margin: 0 0 16px;
}

.ar-imw__sp-updated {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 1.12px;
    color: #000;
    margin: 0;
    opacity: 0.65;
}

/* ══ RIGHT — Frosted-glass panel ═════════════════════════════ */

.ar-imw__right {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.ar-imw__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.ar-imw__bg--fallback {
    background: linear-gradient(135deg, #01303A 0%, #025c72 60%, #01303A 100%);
}

.ar-imw__overlay {
    position: absolute;
    inset: 0;
    background: rgba(1, 47, 57, 0.62);
    z-index: 1;
}

.ar-imw__glass {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 40px 48px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    height: 100%;
    box-sizing: border-box;
}

.ar-imw__glass-meta {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 1.28px;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 28px;
    flex-shrink: 0;
}

.ar-imw__items {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 0;
}

.ar-imw__divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.ar-imw__item {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    overflow: visible; /* must be visible — overflow:hidden clips the button hover scale */
    padding: 20px 0;
    gap: 8px;
    position: relative;
}

.ar-imw__item-date {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 13px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.25;
    display: block;
    flex-shrink: 0; /* date is always fully visible */
}

.ar-imw__item-title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    margin: 0;
    /* 2-line clamp. max-height = 58px gives safe room for 2 lines of
       Nunito Sans at 20px/1.3 line-height (26px/line = 52px + 6px buffer
       for sub-pixel rounding). Without this the clamp shows only 1 line. */
    max-height: 58px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ar-imw__item-excerpt {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Content-area link (date + title + excerpt block) ─────── */
/*
 * Wraps the text content of each right-panel item so the whole
 * zone is a clickable link surface — not just the circle arrow.
 * Uses display:block so it stacks children like the original divs.
 * Hover/focus give a gentle opacity shift; focus gets a visible
 * outline for keyboard users.
 */
.ar-imw__item-content-link {
    display: block;
    color: inherit !important;
    text-decoration: none !important;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

.ar-imw__item-content-link:hover {
    opacity: 0.82;
    text-decoration: none !important;
}

.ar-imw__item-content-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.55);
    outline-offset: 3px;
    opacity: 1;
}

.ar-imw__item-content-link .ar-imw__item-date,
.ar-imw__item-content-link .ar-imw__item-title,
.ar-imw__item-content-link .ar-imw__item-excerpt {
    pointer-events: none; /* prevent child elements from swallowing the link hit area */
}

/* ── Circle arrow link (decorative / redundant) ────────────── */
/*
 * Kept for visual consistency. Hidden from the accessibility tree
 * (tabindex=-1, aria-hidden) via the shortcode since the content
 * link above already covers the same destination.
 */
.ar-imw__item-link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-decoration: none;
    margin-top: auto;
    padding-top: 8px;
}

.ar-imw__item-link:hover .ar-imw__icon-circle,
.ar-imw__item-link:focus .ar-imw__icon-circle {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.08);
}

.ar-imw__icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.ar-imw__icon-circle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.ar-imw__item-btns {
    display: flex;
    flex-direction: row;
    gap: 10px;
    margin-top: auto;
    margin-left: auto; /* pushes buttons to the right, aligns with news arrow */
    padding-top: 8px;
}

.ar-imw__btn-wrap {
    display: flex;
    flex-shrink: 0;
}

/* Circle buttons in white for dark glass context */
.ar-imw__item-btns .ar-action--circle-only .ar-action__circle {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    background: transparent;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ar-imw__item-btns .ar-action--circle-only:hover .ar-action__circle,
.ar-imw__item-btns .ar-action--circle-only:focus .ar-action__circle {
    background: rgba(255, 255, 255, 0.18);
    transform: scale(1.08);
}

.ar-imw__empty {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    padding: 20px 0;
    margin: 0;
}

/* ══ RESPONSIVE ═════════════════════════════════════════════ */

/* Tablet: 641px – 1024px */
@media (max-width: 1024px) {
    .ar-imw__section {
        padding-left: 64px;
        padding-right: 64px;
        padding-bottom: 72px;
    }

    .ar-imw {
        grid-template-columns: 1fr 1fr;
        min-height: 420px;
    }

    .ar-imw__left {
        padding: 48px 32px;
    }

    .ar-imw__sp-title {
        font-size: 22px;
        line-height: 1.4;
        margin-bottom: 20px;
    }

    .ar-imw__sp-number { font-size: 64px; }

    .ar-imw__sp-currency {
        font-size: 24px;
        padding-bottom: 7px;
    }

    .ar-imw__change {
        font-size: 18px;
        letter-spacing: 1.2px;
        margin-bottom: 24px;
    }

    .ar-imw__change-value,
    .ar-imw__change-percent {
        font-size: 18px;
        letter-spacing: 1.2px;
    }

    .ar-imw__sp-rule { width: 100%; }

    .ar-imw__glass { padding: 36px 32px; }

    .ar-imw__glass-meta { margin-bottom: 20px; }
}

/* Mobile: ≤640px */
@media (max-width: 640px) {
    .ar-imw__section {
        padding-left: 24px;
        padding-right: 24px;
        padding-bottom: 48px;
    }

    .ar-imw {
        grid-template-columns: 1fr;
        border-radius: 20px;
        min-height: unset;
    }

    .ar-imw__left {
        padding: 36px 24px;
        border-radius: 20px 20px 0 0;
    }

    .ar-imw__sp-title {
        font-size: 20px;
        line-height: 1.4;
        margin-bottom: 16px;
    }

    .ar-imw__sp-number { font-size: 56px; }

    .ar-imw__sp-currency {
        font-size: 20px;
        padding-bottom: 6px;
    }

    .ar-imw__change {
        font-size: 16px;
        letter-spacing: 1px;
        margin-bottom: 24px;
    }

    .ar-imw__change-value,
    .ar-imw__change-percent {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .ar-imw__sp-rule { width: 100%; }

    .ar-imw__right {
        border-radius: 0 0 20px 20px;
        min-height: 320px;
    }

    .ar-imw__glass { padding: 28px 24px; }

    .ar-imw__glass-meta { margin-bottom: 16px; }
}
