/* ── Savable Actions Widget (save + favorite buttons) ──────────────────────
   Loaded globally via design-system/main.css so buttons render correctly
   on all content pages (topic, stock, company, asset, forex, etc.)
   Active/filled states: teal = saved  |  gold = favorited
   ─────────────────────────────────────────────────────────────────────── */

.savable-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.savable-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px;
    border: none;
    border-radius: 50%;
    background: var(--surface-2, #F0F4F8);
    color: var(--text-muted, #5E7A95);
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
    transition: background .18s ease, color .18s ease,
                transform .12s ease, box-shadow .18s ease;
}
.savable-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.savable-btn:active  { transform: translateY(0); box-shadow: none; }
.savable-btn:disabled { opacity: .5; cursor: wait; transform: none; }

/* ── Save — teal ── */
.savable-btn-save:hover {
    background: rgba(14, 124, 123, .1);
    color: var(--teal, #0E7C7B);
}
.savable-btn-save.is-active {
    background: var(--teal, #0E7C7B);
    color: #fff;
    box-shadow: 0 2px 10px rgba(14, 124, 123, .35);
}
.savable-btn-save.is-active:hover {
    background: #0a6665;
    box-shadow: 0 4px 16px rgba(14, 124, 123, .45);
}

/* ── Favorite — gold ── */
.savable-btn-favorite:hover {
    background: rgba(245, 158, 11, .12);
    color: #B45309;
}
.savable-btn-favorite.is-active {
    background: #F59E0B;
    color: #fff;
    box-shadow: 0 2px 10px rgba(245, 158, 11, .4);
}
.savable-btn-favorite.is-active:hover {
    background: #D97706;
    box-shadow: 0 4px 16px rgba(245, 158, 11, .5);
}

/* ── Icon + label ── */
.savable-btn__icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* Icons only — label always hidden */
.savable-btn__label { display: none; }

/* ── Share Widget ───────────────────────────────────────────────────────── */

.savable-share {
    position: relative;
}

.savable-share__trigger {
    /* inherits .savable-btn styles */
}
.savable-share__trigger:hover,
.savable-share__trigger[aria-expanded="true"] {
    background: rgba(14, 124, 123, .1);
    color: var(--teal, #0E7C7B);
}

.savable-share__popover {
    position: absolute;
    bottom: calc(100% + 8px);
    inset-inline-end: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(6px);
    visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 200;
}
.savable-share__popover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    inset-inline-end: 12px;
    width: 9px;
    height: 9px;
    background: #fff;
    border-inline-end: 1px solid rgba(0,0,0,.10);
    border-bottom: 1px solid rgba(0,0,0,.10);
    transform: rotate(45deg);
}
.savable-share__popover[aria-hidden="false"] {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.savable-share__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0;
    background: var(--surface-2, #F0F4F8);
    color: #444;
    transition: background .15s, color .15s, transform .12s;
}
.savable-share__item:hover { transform: scale(1.12); }

.savable-share__item--fb  { background: #E8F0FE; color: #1877F2; }
.savable-share__item--fb:hover  { background: #1877F2; color: #fff; }

.savable-share__item--x   { background: #f0f0f0; color: #000; }
.savable-share__item--x:hover   { background: #000; color: #fff; }

.savable-share__item--wa  { background: #E7F8EE; color: #25D366; }
.savable-share__item--wa:hover  { background: #25D366; color: #fff; }

.savable-share__item--tg  { background: #E8F4FB; color: #229ED9; }
.savable-share__item--tg:hover  { background: #229ED9; color: #fff; }

.savable-share__item--copy { background: var(--surface-2, #F0F4F8); color: #555; font-size: .65rem; font-family: inherit; font-weight: 600; }
.savable-share__item--copy:hover { background: var(--teal, #0E7C7B); color: #fff; }
