/* StileJuventus V9.529 - "Dì la tua" article-to-post bridge */

.slr-article-opinion-cta {
    --slr-opinion-bg: linear-gradient(135deg, rgba(255, 199, 44, .09), rgba(121, 23, 52, .13));
    --slr-opinion-border: rgba(255, 255, 255, .12);
    --slr-opinion-text: #f4f6f8;
    --slr-opinion-muted: #aeb6bf;
    --slr-opinion-accent: #f2bd32;
    --slr-opinion-button-bg: #f4f6f8;
    --slr-opinion-button-text: #101317;
    --slr-opinion-button-hover: #f2bd32;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin: 22px clamp(14px, 2vw, 22px) 8px;
    padding: 20px 22px;
    border: 1px solid var(--slr-opinion-border);
    border-radius: 18px;
    background: var(--slr-opinion-bg);
    color: var(--slr-opinion-text);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
    isolation: isolate;
}

.slr-article-opinion-cta::before {
    content: "";
    position: absolute;
    inset: auto -38px -62px auto;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 189, 50, .13), rgba(242, 189, 50, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

.slr-article-opinion-cta__copy {
    min-width: 0;
}

.slr-article-opinion-cta__eyebrow {
    display: block;
    margin: 0 0 5px;
    color: var(--slr-opinion-accent);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.slr-article-opinion-cta__title {
    display: block;
    margin: 0;
    color: var(--slr-opinion-text);
    font-size: clamp(19px, 2.3vw, 23px);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.02em;
}

.slr-article-opinion-cta__description {
    margin: 6px 0 0;
    max-width: 640px;
    color: var(--slr-opinion-muted);
    font-size: 14px;
    line-height: 1.48;
}

.slr-article-opinion-cta__button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--slr-opinion-button-bg);
    color: var(--slr-opinion-button-text);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
    transition: transform .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.slr-article-opinion-cta__button svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.slr-article-opinion-cta__button:hover {
    background: var(--slr-opinion-button-hover);
    color: var(--slr-opinion-button-text);
    transform: translateY(-1px);
    box-shadow: 0 9px 22px rgba(0, 0, 0, .18);
}

.slr-article-opinion-cta__button:active {
    transform: translateY(0);
}

.slr-article-opinion-cta__button:focus-visible,
.slr-post-composer-article-context__remove:focus-visible,
.slr-community-source-article:focus-visible {
    outline: 3px solid rgba(242, 189, 50, .5);
    outline-offset: 3px;
}

/* Context shown inside the existing community composer. */
.slr-post-composer-article-context {
    --slr-op-context-bg: rgba(255, 255, 255, .035);
    --slr-op-context-border: rgba(255, 255, 255, .12);
    --slr-op-context-text: #eef1f4;
    --slr-op-context-muted: #9ca6b1;
    --slr-opinion-accent: #f2bd32;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) 34px;
    gap: 12px;
    align-items: center;
    margin: 10px 0 12px;
    padding: 10px;
    border: 1px solid var(--slr-op-context-border);
    border-radius: 14px;
    background: var(--slr-op-context-bg);
    color: var(--slr-op-context-text);
}

/* V9.530: guardrail layout — il contesto resta nella colonna editor e non può restringere il textarea. */
.slr-post-composer-editor > .slr-post-composer-article-context {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.slr-post-composer-editor > .slr-post-composer-text-shell,
.slr-post-composer-editor > .slr-post-composer-text-shell > textarea[data-social-composer-body] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.slr-post-composer-article-context--no-image {
    grid-template-columns: minmax(0, 1fr) 34px;
}

.slr-post-composer-article-context__image {
    width: 74px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(127, 127, 127, .12);
}

.slr-post-composer-article-context__copy {
    min-width: 0;
}

.slr-post-composer-article-context__label {
    display: block;
    margin-bottom: 3px;
    color: var(--slr-opinion-accent, #f2bd32);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.slr-post-composer-article-context__title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--slr-op-context-text);
    font-size: 13px;
    font-weight: 760;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.slr-post-composer-article-context__remove {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--slr-op-context-muted);
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.slr-post-composer-article-context__remove:hover {
    background: rgba(255, 255, 255, .08);
    color: var(--slr-op-context-text);
}

.slr-post-composer-article-context__remove svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

/* Article card embedded in a published community post. */
.slr-community-source-article {
    --slr-source-bg: rgba(255, 255, 255, .025);
    --slr-source-border: rgba(255, 255, 255, .12);
    --slr-source-border-hover: rgba(242, 189, 50, .34);
    --slr-source-title: #eef1f4;
    --slr-source-muted: #9fa8b2;
    --slr-opinion-accent: #f2bd32;
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    overflow: hidden;
    margin: 11px 0 4px;
    border: 1px solid var(--slr-source-border);
    border-radius: 15px;
    background: var(--slr-source-bg);
    color: inherit;
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.slr-community-source-article--no-image {
    grid-template-columns: minmax(0, 1fr);
}

.slr-community-source-article:hover {
    border-color: var(--slr-source-border-hover);
    background: rgba(255, 255, 255, .045);
    transform: translateY(-1px);
}

.slr-community-source-article__media {
    min-height: 104px;
    background: rgba(127, 127, 127, .1);
}

.slr-community-source-article__media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 104px;
    object-fit: cover;
}

.slr-community-source-article__body {
    min-width: 0;
    padding: 11px 13px 12px;
}

.slr-community-source-article__section {
    display: block;
    overflow: hidden;
    margin: 0 0 4px;
    color: var(--slr-opinion-accent, #f2bd32);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .065em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.slr-community-source-article__title {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--slr-source-title) !important;
    -webkit-text-fill-color: var(--slr-source-title) !important;
    font-size: 14px;
    font-weight: 790;
    line-height: 1.32;
    letter-spacing: -.01em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.slr-community-source-article__excerpt {
    display: -webkit-box;
    overflow: hidden;
    margin: 5px 0 0;
    color: var(--slr-source-muted) !important;
    -webkit-text-fill-color: var(--slr-source-muted) !important;
    font-size: 12px;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Explicit light-theme overrides: no muddy grey-on-grey states. */
html[data-slr-theme="light"] .slr-article-opinion-cta,
body[data-slr-theme="light"] .slr-article-opinion-cta,
html.theme-light .slr-article-opinion-cta,
body.theme-light .slr-article-opinion-cta {
    --slr-opinion-bg: #ffffff;
    --slr-opinion-border: #dfe4e8;
    --slr-opinion-text: #111418;
    --slr-opinion-muted: #53606c;
    --slr-opinion-accent: #8f1738;
    --slr-opinion-button-bg: #111418;
    --slr-opinion-button-text: #ffffff;
    --slr-opinion-button-hover: #8f1738;
    background: #ffffff;
    background-image: none;
    box-shadow: none;
}

html[data-slr-theme="light"] .slr-article-opinion-cta::before,
body[data-slr-theme="light"] .slr-article-opinion-cta::before,
html.theme-light .slr-article-opinion-cta::before,
body.theme-light .slr-article-opinion-cta::before {
    display: none;
}

html[data-slr-theme="light"] .slr-article-opinion-cta__button:hover,
body[data-slr-theme="light"] .slr-article-opinion-cta__button:hover,
html.theme-light .slr-article-opinion-cta__button:hover,
body.theme-light .slr-article-opinion-cta__button:hover {
    color: #ffffff;
}


html[data-slr-theme="dark"] body.slr-site .slr-article-opinion-cta__button {
    background: #f4f6f8 !important;
    border-color: #f4f6f8 !important;
    color: #101317 !important;
    -webkit-text-fill-color: #101317 !important;
}

html[data-slr-theme="dark"] body.slr-site .slr-article-opinion-cta__button:hover,
html[data-slr-theme="dark"] body.slr-site .slr-article-opinion-cta__button:focus-visible {
    background: #f2bd32 !important;
    border-color: #f2bd32 !important;
    color: #101317 !important;
    -webkit-text-fill-color: #101317 !important;
}

html[data-slr-theme="light"] body.slr-site .slr-article-opinion-cta__button {
    background: #111418 !important;
    border-color: #111418 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-slr-theme="light"] body.slr-site .slr-article-opinion-cta__button:hover,
html[data-slr-theme="light"] body.slr-site .slr-article-opinion-cta__button:focus-visible {
    background: #8f1738 !important;
    border-color: #8f1738 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html[data-slr-theme="light"] .slr-post-composer-article-context,
body[data-slr-theme="light"] .slr-post-composer-article-context,
html.theme-light .slr-post-composer-article-context,
body.theme-light .slr-post-composer-article-context {
    --slr-op-context-bg: #f7f9fa;
    --slr-op-context-border: #d8e0e6;
    --slr-op-context-text: #101418;
    --slr-op-context-muted: #5e6b77;
    --slr-opinion-accent: #8f1738;
}

html[data-slr-theme="light"] .slr-post-composer-article-context__remove:hover,
body[data-slr-theme="light"] .slr-post-composer-article-context__remove:hover,
html.theme-light .slr-post-composer-article-context__remove:hover,
body.theme-light .slr-post-composer-article-context__remove:hover {
    background: #e9eef2;
}

html[data-slr-theme="light"] .slr-community-source-article,
body[data-slr-theme="light"] .slr-community-source-article,
html.theme-light .slr-community-source-article,
body.theme-light .slr-community-source-article {
    --slr-source-bg: #ffffff;
    --slr-source-border: #d7dfe5;
    --slr-source-border-hover: #8f1738;
    --slr-source-title: #111418;
    --slr-source-muted: #56636f;
    --slr-opinion-accent: #8f1738;
    box-shadow: 0 2px 10px rgba(15, 20, 25, .035);
}

html[data-slr-theme="light"] .slr-community-source-article:hover,
body[data-slr-theme="light"] .slr-community-source-article:hover,
html.theme-light .slr-community-source-article:hover,
body.theme-light .slr-community-source-article:hover {
    background: #fafbfc;
}

@media (max-width: 640px) {
    .slr-article-opinion-cta {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        margin: 18px 10px 8px;
        padding: 17px;
        border-radius: 16px;
    }

    .slr-article-opinion-cta__description {
        font-size: 13px;
    }

    .slr-article-opinion-cta__button {
        width: 100%;
        min-height: 45px;
    }

    .slr-post-composer-article-context {
        grid-template-columns: 62px minmax(0, 1fr) 30px;
        gap: 9px;
        padding: 9px;
    }

    .slr-post-composer-article-context--no-image {
        grid-template-columns: minmax(0, 1fr) 30px;
    }

    .slr-post-composer-article-context__image {
        width: 62px;
        height: 56px;
    }

    .slr-community-source-article {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .slr-community-source-article__media,
    .slr-community-source-article__media img {
        min-height: 96px;
    }

    .slr-community-source-article__body {
        padding: 9px 10px 10px;
    }

    .slr-community-source-article__title {
        font-size: 13px;
    }

    .slr-community-source-article__excerpt {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slr-article-opinion-cta__button,
    .slr-post-composer-article-context__remove,
    .slr-community-source-article {
        transition: none;
    }
}
