@media all {
    #reuters_container {
        -webkit-tap-highlight-color: transparent;
    }
    #reuters_container:not(.opaque),
    .btc--under_nav.btc--desktop .banner_top_container:not(.opaque) {
        opacity: 1;
        transition: opacity 1.7s;
    }

    #reuters_container.opaque,
    .btc--under_nav.btc--desktop .banner_top_container.opaque {
        opacity: .2;
        transition: opacity .2s;
    }

    .reuters_box {
        overflow-y: hidden;
        white-space: nowrap;
        border-right-width: 10px;
    }
    .reuters_box::-webkit-scrollbar {
        display: none;
    }
    .reuters_box {
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none; /* Firefox */
    }
    .reuters_box_table {
        height: 100%;
        border-top-width: 10px;
        border-bottom-width: 10px;
        position: relative;
    }
    .reuters_box,
    .reuters_box_table,
    .reuters_footer_table,
    .reuters_footer,
    .reuters_header,
    .reuters_header_table {
        background-color: #F5F3ED;
        border-color: #F5F3ED;
        border-style: solid;
    }
    .reuters_news_cell {
        vertical-align: top;
    }
    .box-articlez.reuters_news {
        margin: 0;
        border-left: 1px solid #ccc;
        white-space: normal;
    }
    .reuters_header_table {
        border-bottom: 1px solid #ccc !important;
        height: 58px !important;
    }
    .reuters_footer,
    .reuters_header {
        text-align: center;
    }
    .box-articlez a.box-article-title.reuters_news,
    .box-article-title.reuters_news:hover {
        font-family: "Lyon Text OSF Web", Georgia, "Times New Roman", Times, serif;
        font-size: 16px;
        line-height: 22px;
    }
    .box-articlez a.box-article-title.reuters_news {
        margin-bottom: 0 !important;
        margin-top: 2px !important;
    }
    .box-article-title.reuters_news:hover {
        color: #006a9c;
    }
    .reuters_header_box_cell {
        vertical-align: top !important;
    }
    .content_date.reuters_news {
        line-height: normal;
    }
    .content_date.reuters_news .meta-time {
        color: black;
        line-height: 20px;
        font-size: 16px;
    }
    .reuters_more_news {
        vertical-align: bottom;
    }
    .box-articlez.reuters_news.reuters_more_news a {
        font-weight: bold;
        position: absolute;
        white-space: nowrap;
        font-family: "Lyon Text OSF Web", Georgia, "Times New Roman", Times, serif;
        font-size: 16px;
        line-height: 22px;
    }
    .reuters_broadcast {
        font-family: "Lyon Text OSF Web";
        font-size: 19px;
        text-align: right;
    }
    input.reuters_locality,
    input.reuters_locality_mobile {
        text-align: right;
        background: none;
        border-width: 0;
        padding: 0 !important;
        margin-top: 0 !important;
        margin-left: 0 !important;
        outline: none;
    }
    input.reuters_locality {
        margin-right: 6px !important;
    }
    input.reuters_locality_mobile {
        margin-right: 0px !important;
    }
    .reuters_footer input.reuters_locality {
        width: 200px !important;
    }
    .reuters_header input.reuters_locality,
    .reuters_header input.reuters_locality_mobile{
        width: 160px !important;
    }
    .reuters_date_place,
    #reuters_container .hentry__title {
        white-space: nowrap;
    }
    ul.ui-autocomplete,
    .ui-menu-item {
        background-color: #F5F3ED;
        font-family: "Lyon Text OSF Web", Georgia, "Times New Roman", Times, serif;
        border-width: 0;
    }
    ul.ui-autocomplete {
        width: 200px !important;
        left: 65vw !important;
        border: 1px solid #ccc;
    }
    .reuters_broadcast {
        display:none;
    }
    .reuters_locality_mobile_cell {
        text-align: right;
        padding-right: 10px;
    }
    .reuters_locality_mobile {
        min-width: 10px;
        min-width: 60px !important;
    }
    .reuters_header_box_cell_small_screen h2.hentry__title a:hover,
    .reuters_header_box_cell h2.hentry__title a:hover {
        text-decoration: none;
        color: #006a9c;
    }
}

@media (max-width: 308px) {
    #reuters_container {
        padding-top: 30px;
    }
}

@media (max-width: 380px) {

    .box-articlez.reuters_news {
        height: 147px !important;
    }
    .reuters_box {
        height: 177px !important;
    }
}
@media (max-width: 480px) {
    .reuters_header_box_cell_small_screen h2 {
        font-size: 27px !important;
    }
    .reuters_header_table .reuters_date_place {
        vertical-align: top;
        padding-top: 3px;
        height: 41px;
    }
    .reuters_header {
        padding-top: 3px;
    }
    .reuters_box {
        padding-top: 4px;
    }
    .reuters_footer {
        height: 40px;
    }
    .box-articlez.reuters_news {
        padding: 0 12px
    }
    .reuters_footer_table_small_screen {
        height: 40px !important;
    }
    .reuters_scroller_small_screen div {
        height: 40px !important;
    }
    .reuters_temperature, .reuters_locality {
        display: none !important;
    }
    .reuters_date_place,
    ul.ui-autocomplete,
    .ui-menu-item,
    .reuters_locality_mobile {
        font-size: 17px !important;
    }
}

@media (min-width: 480px) {
    .reuters_locality_mobile {
        display: none !important;
    }
}

@media (min-width: 480px) and (max-width: 661px) {
    .reuters_header_box_cell_small_screen h2 {
        font-size: 32px !important;
    }
    .reuters_header_table .reuters_date_place {
        vertical-align: top;
        padding-top: 3px;
        height: 40px;
    }
    .reuters_header {
        padding-top: 4px;
    }
}

@media (max-width: 661px) {
    .reuters_header_box_cell + .reuters_news_cell > .box-articlez.reuters_news {
        padding-left: 12px !important;
    }
    .box-articlez.reuters_news {
        padding: 0 13px 0 14px
    }
}

@media (min-width: 600px) and (max-width: 661px) {
    .reuters_header {
        padding-top: 4px !important;
    }
}

@media (min-width: 480px) and (max-width: 980px) {
    .reuters_temperature,
    .reuters_date_place,
    .reuters_locality,
    ul.ui-autocomplete,
    .ui-menu-item {
        font-size: 18px;
    }
}

@media (max-width: 661px) {
    .reuters_header_box_cell_small_screen {
        padding-left: 10px;
    }
    .reuters_header_table .reuters_date_place {
        padding-left: 10px;
    }
    .reuters_more_news_small_screen{
        padding-left: 10px;
    }
    #reuters_container {
        margin-bottom: 24px;
    }
    .reuters_box .box-articlez__data {
        margin-top: 0;
    }
    .box-articlez.reuters_news {
        width: 49.5vw;
    }
    .reuters_box,
    .reuters_header,
    .reuters_footer,
    .reuters_header_table,
    .reuters_footer_table_small_screen {
        width: 100%;
    }
    .box-articlez.reuters_news.reuters_more_news {
        width: 48vw;
    }
    .box-articlez.reuters_news.reuters_more_news a {
        right: 30px;
    }
}

/*@media (min-width: 660px) and (max-width: 661px) {*/
/*    .reuters_box,*/
/*    .reuters_header,*/
/*    .reuters_footer,*/
/*    .reuters_header_table,*/
/*    .reuters_footer_table_small_screen {*/
/*        width: 96vw !important;*/
/*    }*/
/*}*/

@media (min-width: 661px) {
    .box-articlez.reuters_news.reuters_more_news a {
        right: 20px;
    }
}

@media (min-width: 661px) and (max-width: 980px) {
    .reuters_header {
        padding-top: 4px;
    }
    .reuters_box {
        width: 636px;
        border-left-width: 6px !important;
    }
    .reuters_more_news_small_screen {
        padding-left: 20px;
    }
    .reuters_header_box_cell_small_screen,
    .reuters_header_table .reuters_date_place {
        padding-left: 17px;
    }
    .reuters_header_box_cell_small_screen h2 {
        font-size: 34px !important;
    }
    .box-articlez.reuters_news {
        width: 210px;
        padding: 0 7px 0 15px;
    }
    .reuters_header,
    .reuters_footer,
    .reuters_header_table,
    .reuters_footer_table_small_screen {
        width: 636px;
    }
    .reuters_header_table .reuters_date_place {
        vertical-align: top;
        padding-top: 5px;
        height: 40px;
    }
}
@media (max-width: 660px) {
    .reuters_header_table .reuters_broadcast {
        padding-right: 10px !important;
    }
    .reuters_scroller_small_screen div {
        left: 7px;
        position: relative;
    }
}
@media (max-width: 980px) {
    .box-articlez.reuters_news {
        height: 125px;
    }
    input.reuters_locality {
        margin-bottom: 0 !important;
    }
    .reuters_scroller,
    .box-articlez.reuters_news.reuters_header_box,
    .reuters_footer_table {
        display: none;
    }
    .reuters_box {
        height: 155px;
    }
    .reuters_news_cell:nth-of-type(2) .box-articlez {
        border-left: 0;
    }
    .reuters_footer_table_small_screen {
        border-top: 1px solid #ccc;
        height: 43px;
    }
    .reuters_scroller_small_screen div {
        width: 100%;
        height: 43px;
        text-align: right;
        background-repeat: no-repeat;
        background-position: center;
        background-image: url('../img/icons/right_arrow_black.svg') !important;
        background-size: 70%;
        cursor: pointer;
    }
    .reuters_header_box_cell_small_screen,
    .reuters_header_table .reuters_date_place {
        text-align: left;
    }
    .reuters_header_box_cell_small_screen,
    .reuters_header_table .reuters_broadcast {
        padding-top: 8px;
    }
    .reuters_header_box_cell_small_screen {
        vertical-align: bottom;
    }
    .reuters_header_table .reuters_broadcast {
        padding-right: 15px;
    }
    .reuters_header_table .reuters_broadcast .reuters_broadcast_icon {
        width:23px;
        max-height: 24px !important;
    }
    .reuters_header_box_cell_small_screen h2 {
        line-height: 1 !important;
        font-family: "Stencil", Georgia, "Times New Roman", Times, serif !important;
        margin-bottom: 0 !important;
    }
    .reuters_scroller_small_screen {
        width: 43px;
        text-align: right;
    }
    .reuters_more_news_small_screen,
    .reuters_scroller_small_screen {
        vertical-align: middle;
    }
    .reuters_more_news_small_screen {
        font-family: "Lyon Text OSF Web";
        font-size: 18px;
        text-align: left;
    }
    .reuters_scroller_small_screen div.left {
        transform: scaleX(-1);
        display: none;
    }
    .box-articlez.reuters_news.reuters_more_news {
        padding-left: 10px;
    }
    .box-articlez.reuters_news.reuters_more_news a {
        bottom: 15px;
    }
}

@media (min-width: 980px) {
    .box-articlez.reuters_news {
        height: 103px;
    }
    input.reuters_locality {
        margin-bottom: 1px !important;
    }
    ul.ui-autocomplete,
    .ui-menu-item,
    .reuters_broadcast *,
    .reuters_date_place {
        font-size: 20px !important;
    }
    .reuters_footer_table_small_screen,
    .reuters_header {
        display: none;
    }
    .reuters_box {
        width: 950px;
        padding-top: 5px;
    }
    .reuters_box,
    .reuters_footer {
        border-left-width: 10px;
    }
    .box-articlez.reuters_news {
        width: 224px;
        padding: 0 10px;
    }
    .box-articlez.reuters_news.reuters_header_box {
        border-width: 0;
    }
    .box-articlez.reuters_news.reuters_header_box h2 {
        line-height: 1;
        font-size: 36px;
        font-family: "Stencil", Georgia, "Times New Roman", Times, serif;
    }
    .box-articlez.reuters_news.reuters_more_news {
        width: 60px;
        padding-left: 10px;
    }
    .box-articlez.reuters_news.reuters_more_news a {
        bottom: 18px;
        right: 10px;
    }
    .reuters_footer_table {
        border-top: 1px solid #ccc !important;
        width: 930px;
        margin-left: 10px;
        height: 55px;
    }
    .reuters_date_place {
        font-family: "Lyon Text OSF Web";
        text-align: left;
    }
    .reuters_broadcast,
    .reuters_date_place {
        vertical-align: middle;
    }
    .reuters_broadcast_icon {
        height: 23px;
        margin-bottom: 2px;
    }
    .reuters_scroller {
        width: 90px;
        display: block;
        position: absolute;
        z-index: 100;
        opacity: 95%;
    }
    .reuters_scroller.left {
        background: linear-gradient(to right, #F5F3ED 38%, transparent);
        display: none;
    }
    .reuters_scroller.right {
        margin-left: 870px;
        background: linear-gradient(to left, #F5F3ED 38%, transparent);
    }
    .reuters_scroller.arrow {
        background-image: url('../img/icons/right_arrow_black.svg') !important;
        background-repeat: no-repeat;
        background-position: center;
        cursor: pointer;
        /*opacity: 75%;*/
        width: 129px;
    }
    .reuters_scroller.left.arrow {
        transform: scaleX(-1);
        margin-left: -50px;
    }
    .reuters_scroller.right.arrow {
        padding-right: 24px;
    }
    .reuters_box {
        width: 970px;
        height: 148px
    }
    .reuters_scroller {
        height: 143px;
    }
}

/* TEMPORARILY RE-ENABLED FOR TESTING - Reuters bookmark functionality */
/* article.reuters_longnews .tools-save {
    display: none !important;
} */

/* Hide empty figures in Reuters articles */
.item_image:has(figure.responsive[data-media=""]),
.item_image:has(img[src=""]),
figure.responsive[data-media=""],
figure.responsive img[src=""] {
    display: none !important;
}

/* Hide empty magazine-article-main-image containers */
.magazine-article-main-image:empty,
.magazine-article-main-image:has(> :empty) {
    display: none !important;
}

/* Ensure images in magazine articles are full width */
.magazine-article-main-image img,
.magazine-article-main-image figure img {
    width: 100%;
    height: auto;
    display: block;
}

/* Reuters Language Toggle Button */
.reuters-lang-switch-container {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 1.5rem;
}

.reuters-lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 10px;

    /* Default state: "Traduci in italiano" - blu background, testo bianco */
    background: #005BA2;
    border: 1px solid #005BA2;
    border-radius: 4px;

    /* Typography - matching article content */
    font-family: "Lyon Text Web", Georgia, "Times New Roman", Times, serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 16px;
    color: #ffffff;

    /* Interaction */
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;

    /* Sizing - exact from Figma */
    height: auto;
    min-height: 32px;
}

.reuters-lang-toggle:hover {
    background: #004080;
    border-color: #004080;
    color: #ffffff;
}

/* State when showing Italian (button says "Leggi in inglese") - bianco background, testo blu */
.reuters-lang-toggle[data-current-lang="it"] {
    background: #ffffff;
    color: #0058A2;
    border-color: #0058A2;
}

.reuters-lang-toggle[data-current-lang="it"]:hover {
    background: #f0f7ff;
    border-color: #004080;
    color: #004080;
}

.reuters-lang-toggle:active {
    background: #e6f2ff;
    transform: translateY(1px);
}

.reuters-lang-toggle:focus {
    outline: none;
}

.reuters-lang-toggle-text {
    font-size: 16px;
    line-height: 16px;
    white-space: nowrap;
    letter-spacing: 0;
}

.reuters-lang-toggle-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: currentColor;
    margin: 0;
}

/* Content visibility states */
.reuters-content-en,
.reuters-content-it {
    transition: opacity 0.3s ease;
}

.reuters-content-en.fade-out,
.reuters-content-it.fade-out {
    opacity: 0;
}

/* Translated title style */
.reuters-translated-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    line-height: 1.3;
}


/* Ensure grid classes work properly for Reuters articles */
@media (min-width: 960px) {
    article.reuters_longnews .lg\:col-end-8 {
        grid-column-end: 8 !important;
    }

    article.reuters_longnews .lg\:col-start-1 {
        grid-column-start: 1 !important;
    }

    article.reuters_longnews .lg\:col-start-10 {
        grid-column-start: 10 !important;
    }

    article.reuters_longnews .lg\:col-end-13 {
        grid-column-end: 13 !important;
    }
}

@media (min-width: 1280px) {
    article.reuters_longnews .xl\:col-end-9 {
        grid-column-end: 9 !important;
    }

    article.reuters_longnews .xl\:col-start-3 {
        grid-column-start: 3 !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reuters-lang-switch-container {
        justify-content: flex-start;
    }

    .reuters-lang-toggle {
        /* Mantiene le stesse dimensioni del desktop */
    }
}
