@import 'variables.css';

/* =========================================================
   Golden Tip - section under the hero of /Ideas
   The card is a 1:1 port of the app card. It is data only:
   every value is filled from window.__goldenTipData
   (js/golden-tip.js), every label is localized in the markup.
   Nothing here assumes a text length - the card grows with
   the language it renders in.
   ========================================================= */

.golden-tip-section {
    --gt-gold: #E9B23C;
    --gt-gold-a: #F7CE52;
    --gt-gold-b: #E9A937;
    --gt-up: #5FD98C;
    --gt-down: #ED5562;
    --gt-card-bg: #2B2E33;
    --gt-inner-bg: #35383D;
    --gt-line: rgba(255, 255, 255, 0.10);
    --gt-text: #FFFFFF;
    --gt-muted: #A5AAB0;
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 96px 16px;
    background: radial-gradient(120% 80% at 80% 0%, rgba(232, 193, 90, 0.10) 0%, rgba(232, 193, 90, 0) 60%), #06090D;
    overflow: hidden;
}

.golden-tip-box {
    width: min(1440px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

/* Author display rules (flex/grid) outrank the browser's [hidden] rule, so every optional
   block inside the section is switched off explicitly */
.golden-tip-section [hidden] {
    display: none !important;
}

/* ---------- left column: the pitch ---------- */

.golden-tip-copy {
    flex: 1 1 480px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: start;
}

.golden-tip-headline {
    margin: 0 0 24px;
    font-size: clamp(32px, 3.4vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--white);
}

.golden-tip-subtext {
    margin: 0 0 32px;
    font-size: clamp(18px, 1.4vw, 22px);
    font-weight: 600;
    line-height: 1.6;
    color: var(--white);
}

.golden-tip-cta {
    align-self: flex-start;
}

/* ---------- right column: the card ---------- */

.golden-tip-card-wrap {
    flex: 0 1 520px;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.golden-tip-card {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 22px;
    background: var(--gt-card-bg);
    /* height follows the content in every language - never fixed */
    height: auto;
    text-align: start;
    overflow-wrap: anywhere;
}

/* ---- gold badge ---- */

.gt-badge {
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    margin-bottom: 20px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gt-gold-a) 0%, var(--gt-gold-b) 100%);
    max-width: 100%;
}

.gt-badge__star {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: #101114;
}

.gt-badge__text {
    color: #101114;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

/* ---- tip image ---- */

.gt-image {
    display: block;
    width: 100%;
    margin: 0 0 16px;
    border-radius: 14px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* ---- instrument headline ---- */

.gt-headline {
    margin: 0 0 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.gt-headline__name {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--gt-text);
}

.gt-headline__symbol {
    font-size: 18px;
    font-weight: 400;
    color: var(--gt-muted);
    direction: ltr;
    unicode-bidi: isolate;
}

.gt-arrow {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    align-self: center;
    color: var(--gt-up);
}

.gt-arrow.is-down {
    color: var(--gt-down);
    transform: rotate(180deg);
}

/* ---- expected move ---- */

.gt-move {
    margin: 0 0 4px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--gt-text);
}

.gt-move__value {
    color: var(--gt-up);
    direction: ltr;
    unicode-bidi: isolate;
}

.gt-move__value.is-down {
    color: var(--gt-down);
}

.gt-period {
    margin: 0 0 18px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--gt-muted);
}

/* ---- publication / target prices ---- */

.gt-prices {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border-radius: 14px;
    background: var(--gt-inner-bg);
    padding: 14px 8px;
}

.gt-prices__cell {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    text-align: center;
}

.gt-prices__cell + .gt-prices__cell {
    border-inline-start: 1px solid rgba(255, 255, 255, 0.14);
}

.gt-prices__label {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--gt-muted);
}

.gt-prices__value {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gt-text);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
}

/* ---- bullets ---- */

.gt-bullets {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gt-bullets--more {
    margin-top: 14px;
}

.gt-bullet {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.gt-bullet__icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--gt-gold);
}

.gt-bullet__text {
    font-size: 15.5px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--gt-text);
}

.gt-showmore {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--gt-gold);
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 500;
    cursor: pointer;
}

.gt-showmore__chevron {
    width: 14px;
    height: 14px;
    transition: transform 160ms ease;
}

.gt-showmore.is-open .gt-showmore__chevron {
    transform: rotate(180deg);
}

/* ---- instrument + Short / Buy quotes ---- */

.gt-trade {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

a.gt-trade__instrument {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: filter 160ms ease;
}

a.gt-trade__instrument:hover {
    filter: brightness(1.1);
}

.gt-trade__icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
}

.gt-trade__icon img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.gt-trade__id {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
}

.gt-trade__name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--gt-text);
}

.gt-trade__change {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--gt-up);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
}

.gt-trade__change.is-down {
    color: var(--gt-down);
}

a.gt-quote {
    text-decoration: none;
    cursor: pointer;
    transition: filter 160ms ease;
}

a.gt-quote:hover {
    filter: brightness(1.1);
}

.gt-quote {
    flex: 0 1 auto;
    min-width: 104px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 14px;
    border-radius: 12px;
    background: var(--gt-inner-bg);
}

.gt-quote__label {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    color: var(--gt-muted);
}

.gt-quote__price {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--gt-up);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
}

/* ---- footer ---- */

.gt-foot {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gt-line);
}

.gt-foot__meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14px;
    color: var(--gt-muted);
}

.gt-share {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--gt-muted);
    cursor: pointer;
    transition: color 160ms ease;
}

.gt-share:hover {
    color: var(--gt-text);
}

.gt-share svg {
    width: 20px;
    height: 20px;
}

.gt-disclaimer {
    margin: 10px 0 0;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gt-muted);
}

.gt-sample-note {
    margin: 12px 0 0;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(237, 85, 98, 0.12);
    color: var(--gt-down);
    font-size: 12px;
    font-weight: 600;
}

/* =========================
   Responsive: <=1024 (iPad)
   ========================= */
@media (max-width: 1024px) {
    .golden-tip-section {
        padding: 64px 16px;
    }

    .golden-tip-box {
        gap: 32px;
    }

    .golden-tip-card-wrap {
        flex: 0 1 440px;
    }
}

/* =========================
   Responsive: <=768 (Mobile)
   ========================= */
@media (max-width: 768px) {
    .golden-tip-section {
        padding: 48px 16px;
    }

    .golden-tip-box {
        flex-direction: column;
        align-items: stretch;
        gap: 32px;
    }

    .golden-tip-copy,
    .golden-tip-card-wrap {
        flex: unset;
        width: 100%;
    }

    .golden-tip-card {
        max-width: 100%;
        padding: 20px;
    }

    .gt-headline__name {
        font-size: 28px;
    }

    .gt-move {
        font-size: 18px;
    }

    .gt-quote {
        min-width: 88px;
        padding: 8px 10px;
    }
}

/* Narrow phones: the quote row wraps under the instrument instead of overflowing */
@media (max-width: 420px) {
    .gt-trade {
        flex-wrap: wrap;
    }

    .gt-trade__instrument {
        flex: 1 1 120px;
    }

    .gt-quote {
        flex: 1 1 0;
    }
}
