/* 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-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 */
    }
}

/* Reuters Translation Notice Box */
.reuters-translation-notice {
    background: #ffffff;
    border: 1px solid #005BA2;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 1.5rem;
}

.reuters-translation-notice__body {
    width: 100%;
}

.reuters-translation-notice__message {
    font-family: "Lyon Text Web", Georgia, "Times New Roman", Times, serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: #005BA2;
}

.reuters-translation-notice__message a {
    color: #005BA2;
    text-decoration: underline;
}

.reuters-translation-notice__message a:hover {
    color: #004080;
    text-decoration: none;
}

@media (max-width: 768px) {
    .reuters-translation-notice {
        padding: 8px 10px;
    }


}
