.co-preferred-source,
.co-preferred-source *,
.co-preferred-source *::before,
.co-preferred-source *::after { box-sizing: border-box; }

.co-preferred-source { direction: rtl; font-family: inherit; }

/* Google-style action button: intentionally close to Google's standard light button. */
.co-preferred-source .co-google-preferred-btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    height: 36px !important;
    min-height: 36px !important;
    width: auto !important;
    max-width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    padding: 0 13px !important;
    margin: 0 !important;
    border: 1px solid #dadce0 !important;
    border-radius: 18px !important;
    background: #fff !important;
    color: #3c4043 !important;
    font-family: inherit !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    user-select: none;
    white-space: nowrap;
    box-shadow: none !important;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
    position: relative;
    z-index: 3;
    pointer-events: auto !important;
}

.co-preferred-source .co-google-preferred-btn:hover {
    background: #f8f9fa !important;
    border-color: #c7c9cc !important;
    box-shadow: 0 1px 2px rgba(60,64,67,.12) !important;
}

.co-preferred-source .co-google-preferred-btn:focus-visible {
    outline: 2px solid #1a73e8 !important;
    outline-offset: 2px;
}

.co-google-preferred-btn__g {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.co-google-preferred-btn__g svg { display: block; width: 18px; height: 18px; }
.co-google-preferred-btn__label { display: inline-block; overflow: hidden; text-overflow: ellipsis; }

/* Homepage: one single Google-like pill, no outer card and no duplicate text. */
.co-preferred-source--compact {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 9px 0 13px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.co-preferred-source--compact .co-google-preferred-btn--homepage {
    height: 36px !important;
    min-height: 36px !important;
    max-width: 245px !important;
    padding-inline: 12px !important;
}

/* Full article layout */
.co-preferred-source--full {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 28px 0;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
}

.co-preferred-source__content { min-width: 0; display: flex; align-items: flex-start; gap: 11px; }
.co-preferred-source__google-mark {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #4285f4;
}
.co-preferred-source__copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.co-preferred-source__title { font-size: 15px; font-weight: 700; line-height: 1.8; color: #202124; }
.co-preferred-source__description { font-size: 13px; line-height: 1.8; color: #5f6368; }
.co-preferred-source__button-wrap { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }

.co-preferred-source-footer { width: 100%; padding: 10px 16px; text-align: center; direction: rtl; font-size: 13px; }
.co-preferred-source-footer a { text-decoration: none; }

@media (max-width: 767px) {
    .co-preferred-source--compact {
        margin: 8px 0 12px;
    }
    .co-preferred-source--compact .co-google-preferred-btn--homepage {
        max-width: 100% !important;
        font-size: 11px !important;
    }
    .co-preferred-source--full { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
    .co-preferred-source--full .co-preferred-source__button-wrap { justify-content: stretch; }
    .co-preferred-source--full .co-google-preferred-btn { width: 100% !important; }
}
