/* One Article Paper — Clip Styles (theme-agnostic, scoped to .oap-*) */

/* ===== BASE PAPER ===== */
.oap-newspaper-clip {
    box-sizing: border-box;
    position: relative;
    word-break: break-word;
    overflow: hidden;
    background: #fff;
    isolation: isolate;
}

.oap-newspaper-clip *,
.oap-newspaper-clip *::before,
.oap-newspaper-clip *::after {
    box-sizing: border-box;
}

/* Keep content above watermark */
.oap-newspaper-clip > :not(.oap-watermark) {
    position: relative;
    z-index: 1;
}

/* ===== PAGE INFO BAR ===== */
.oap-page-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    word-break: break-word;
}

.oap-page-info-url,
.oap-page-info-date {
    min-width: 0;
}

/* ===== HEADER (masthead) ===== */
.oap-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    width: 100%;
}

.oap-header--centered {
    justify-content: center;
}

.oap-header--has-sides {
    justify-content: space-between;
}

.oap-header-logo {
    flex: 1 1 160px;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.oap-header--centered .oap-header-logo {
    flex: 1 1 100%;
}

.oap-header-ad {
    flex: 0 1 auto;
    max-width: min(200px, 40%);
    min-width: 0;
}

.oap-header-ad img {
    max-width: 100%;
    height: auto;
    display: block;
}

.oap-header-phone {
    flex: 0 1 auto;
    max-width: 100%;
    font-size: 12px;
    text-align: right;
    word-break: break-word;
}

.oap-header img {
    max-width: 100%;
    height: auto;
    display: block;
}

.oap-logo-text {
    text-align: center;
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* ===== META BAR ===== */
.oap-meta-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 6px 12px;
    width: 100%;
}

.oap-meta-left,
.oap-meta-right {
    min-width: 0;
    flex: 1 1 auto;
}

.oap-meta-right {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    justify-content: flex-end;
}

/* ===== BODY & TITLE ===== */
.oap-body {
    overflow: visible;
    width: 100%;
}

.oap-title {
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    clear: both;
}

.oap-categories {
    clear: both;
}

/* ===== FULL-WIDTH THUMBNAIL (standard / image-top) ===== */
.oap-thumb-fullwidth {
    width: 100%;
    margin: 0 0 12px;
    overflow: hidden;
    clear: both;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.oap-thumb-fullwidth img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 420px;
}

/* ===== IMAGE-LEFT: grid (no float overlap) ===== */
.oap-article-grid--image-left {
    display: grid;
    grid-template-columns: minmax(110px, 36%) minmax(0, 1fr);
    gap: 12px 14px;
    align-items: start;
    width: 100%;
    clear: both;
}

.oap-article-grid--image-left .oap-thumb-left {
    float: none !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.oap-article-grid--image-left .oap-thumb-left img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 100%;
}

.oap-article-grid--image-left .oap-content-columns {
    min-width: 0;
    overflow: visible;
}

/* Beside-image: cap columns so text does not crush beside photo */
.oap-content-columns--beside-image {
    column-count: 1 !important;
}

@media (min-width: 640px) {
    .oap-columns-2 .oap-content-columns--beside-image { column-count: 1 !important; }
    .oap-columns-3 .oap-content-columns--beside-image,
    .oap-columns-4 .oap-content-columns--beside-image { column-count: 2 !important; }
}

/* ===== MULTI-COLUMN ARTICLE TEXT ===== */
.oap-content-columns {
    orphans: 2;
    widows: 2;
    column-fill: balance;
    overflow: visible;
    width: 100%;
    clear: both;
}

.oap-content-columns p {
    margin: 0 0 8px;
    /* 1.0.27: a paragraph may continue in the next column; with avoid-column one long paragraph stayed whole in column 1 and the other columns were empty. */
    break-inside: auto;
}

.oap-content-columns img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    break-inside: avoid;
    margin: 6px 0;
}

.oap-content-columns h1,
.oap-content-columns h2,
.oap-content-columns h3,
.oap-content-columns h4 {
    break-after: avoid;
    break-inside: avoid;
    margin: 10px 0 6px;
    font-weight: 700;
}

.oap-content-columns blockquote {
    break-inside: avoid;
    margin: 8px 0;
    padding: 8px 12px;
    border-left: 3px solid rgba(0, 0, 0, 0.2);
}

.oap-content-columns ul,
.oap-content-columns ol {
    margin: 0 0 8px 1.2em;
    padding: 0;
}

/* ===== WATERMARK ===== */
.oap-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    font-size: clamp(32px, 10vw, 72px);
    font-weight: 900;
    color: #000;
    pointer-events: none;
    white-space: nowrap;
    z-index: 0;
    letter-spacing: 6px;
    max-width: 100%;
    overflow: hidden;
}

/* ===== FOOTER ===== */
.oap-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 12px;
    width: 100%;
    clear: both;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.oap-footer > span:first-child {
    flex: 1 1 200px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.oap-footer-dots {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

/* ===== SOCIAL E-PAPER LAYOUT ===== */
.oap-layout-social-epaper {
    display: flex;
    flex-direction: column;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-radius: 2px;
}

.oap-layout-social-epaper .oap-social-masthead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
    padding: 5px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.oap-layout-social-epaper .oap-social-masthead-url,
.oap-layout-social-epaper .oap-social-masthead-date {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.oap-layout-social-epaper .oap-social-top-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 14px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.oap-layout-social-epaper .oap-social-top-brand-logo {
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

.oap-layout-social-epaper .oap-social-top-brand-name {
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.oap-layout-social-epaper .oap-social-top-brand-tagline {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.85;
}

.oap-layout-social-epaper .oap-social-inner {
    padding: 16px 16px 0;
    flex: 1 1 auto;
    min-width: 0;
}

.oap-layout-social-epaper .oap-social-category {
    display: inline-block;
    max-width: 100%;
    margin: 0 0 10px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 3px;
    overflow-wrap: anywhere;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.oap-layout-social-epaper .oap-social-headline,
.oap-layout-social-epaper .oap-social-subhead {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.oap-layout-social-epaper .oap-social-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 0 0 12px;
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.45;
    border-radius: 3px;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.oap-layout-social-epaper .oap-social-meta-left,
.oap-layout-social-epaper .oap-social-meta-right {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    min-width: 0;
}

.oap-layout-social-epaper .oap-social-meta-right {
    margin-left: auto;
}

.oap-layout-social-epaper .oap-social-rule {
    width: 100%;
    flex-shrink: 0;
}

.oap-layout-social-epaper .oap-social-body {
    display: grid;
    gap: 14px;
    align-items: start;
    width: 100%;
}

.oap-layout-social-epaper .oap-social-body--photo-left {
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
}

.oap-layout-social-epaper .oap-social-body--photo-right {
    grid-template-columns: minmax(0, 1fr) minmax(0, 42%);
}

.oap-layout-social-epaper .oap-social-body--photo-right .oap-social-photo {
    order: 2;
}

.oap-layout-social-epaper .oap-social-body--photo-right .oap-social-text {
    order: 1;
}

.oap-layout-social-epaper .oap-social-body--photo-top {
    grid-template-columns: 1fr;
}

.oap-layout-social-epaper .oap-social-body--no-photo {
    grid-template-columns: 1fr;
}

.oap-layout-social-epaper .oap-social-photo {
    float: none !important;
    margin: 0 !important;
    width: 100%;
    max-width: 100%;
    border-style: solid;
    border-color: #000;
    overflow: hidden;
    align-self: start;
    background: #fff;
}

.oap-layout-social-epaper .oap-social-photo img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
    object-fit: cover;
}

.oap-layout-social-epaper .oap-social-photo-caption {
    padding: 5px 8px;
    font-size: 10px;
    line-height: 1.35;
    font-style: italic;
    background: rgba(0, 0, 0, 0.04);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    overflow-wrap: anywhere;
}

.oap-layout-social-epaper .oap-social-text {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: justify;
}

.oap-layout-social-epaper .oap-social-text p {
    margin: 0 0 8px;
}

.oap-layout-social-epaper .oap-social-text p:last-child {
    margin-bottom: 0;
}

.oap-layout-social-epaper .oap-social-text img {
    max-width: 100%;
    height: auto;
}

.oap-layout-social-epaper .oap-social-text hr {
    display: none !important;
    border: none !important;
}

.oap-layout-social-epaper .oap-social-hashtags {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.oap-layout-social-epaper .oap-social-callout {
    clear: both;
    width: 100%;
    margin-top: 14px;
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.oap-layout-social-epaper .oap-social-footer-wrap {
    margin-top: 18px;
    flex-shrink: 0;
    width: 100%;
}

.oap-layout-social-epaper .oap-social-footer {
    display: grid !important;
    grid-template-columns: minmax(72px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px 16px !important;
    min-height: 64px;
    width: 100%;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.oap-layout-social-epaper .oap-social-footer-brand {
    flex-shrink: 0;
    min-width: 0;
}

.oap-layout-social-epaper .oap-social-footer-logo {
    width: var(--oap-footer-logo-size, 88px);
    height: var(--oap-footer-logo-size, 88px);
    max-width: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--oap-footer-logo-border, #1e4fd6);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.oap-layout-social-epaper .oap-social-footer-logo img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    display: block;
}

.oap-layout-social-epaper .oap-social-footer-logo-text {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    max-width: 140px;
    overflow-wrap: anywhere;
}

.oap-layout-social-epaper .oap-social-footer-paper {
    display: block;
}

.oap-layout-social-epaper .oap-social-footer-tagline {
    display: block;
    font-size: 9px;
    font-weight: 500;
    margin-top: 2px;
}

.oap-layout-social-epaper .oap-social-footer-meta {
    text-align: right;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.oap-layout-social-epaper .oap-social-journalist,
.oap-layout-social-epaper .oap-social-location,
.oap-layout-social-epaper .oap-social-site-url,
.oap-layout-social-epaper .oap-social-footer-meta,
.oap-layout-social-epaper .oap-social-footer-logo-text,
.oap-layout-social-epaper .oap-social-footer-logo-text span {
    color: var(--oap-footer-txt, #ffffff) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.oap-layout-social-epaper .oap-social-location,
.oap-layout-social-epaper .oap-social-site-url {
    font-size: 12px;
    margin-top: 2px;
}

.oap-layout-social-epaper .oap-social-site-url {
    font-weight: 500;
    opacity: 0.95;
}

.oap-layout-social-epaper .oap-oneclick-credit {
    text-align: center;
    padding: 10px 12px !important;
    font-size: 11px;
    line-height: 1.4;
    color: #333 !important;
    background: #ececec !important;
    border-top: 1px solid #ccc;
    width: 100%;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.oap-layout-social-epaper .oap-oneclick-credit a {
    color: #222 !important;
    text-decoration: none;
}

.oap-oneclick-credit a:hover {
    text-decoration: underline;
}

/* ===== ACTIONS / BUTTONS ===== */
.oap-actions {
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.oap-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity .15s;
}

.oap-btn:hover {
    opacity: .85;
    text-decoration: none;
}

.oap-share-buttons {
    flex-wrap: wrap;
}

.oap-share-btn {
    text-decoration: none;
    transition: opacity .15s;
}

.oap-share-btn:hover {
    opacity: .8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .oap-article-grid--image-left {
        grid-template-columns: 1fr;
    }

    .oap-content-columns,
    .oap-content-columns--beside-image {
        column-count: 1 !important;
    }

    .oap-layout-social-epaper .oap-social-body,
    .oap-layout-social-epaper .oap-social-body--photo-left,
    .oap-layout-social-epaper .oap-social-body--photo-right,
    .oap-layout-social-epaper .oap-social-body--photo-top {
        grid-template-columns: 1fr;
    }

    .oap-layout-social-epaper .oap-social-body--photo-right .oap-social-photo,
    .oap-layout-social-epaper .oap-social-body--photo-right .oap-social-text {
        order: unset;
    }

    .oap-layout-social-epaper .oap-social-meta {
        flex-direction: column;
    }

    .oap-layout-social-epaper .oap-social-meta-right {
        margin-left: 0;
    }

    .oap-layout-social-epaper .oap-social-footer {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .oap-layout-social-epaper .oap-social-footer-meta {
        text-align: center;
    }

    .oap-layout-social-epaper .oap-social-footer-brand {
        display: flex;
        justify-content: center;
    }

    .oap-header-phone {
        text-align: left;
        flex: 1 1 100%;
    }

    .oap-meta-right {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .oap-title {
        font-size: 20px !important;
    }
}

/* ===== HIDE THEME JUNK IN CLIP CONTENT ===== */
.oap-content-columns .more-read,
.oap-content-columns .related-posts,
.oap-content-columns .you-may-like,
.oap-content-columns [class*="more-read"],
.oap-content-columns [class*="related"],
.oap-content-columns [class*="foxiz"],
.oap-content-columns [class*="widget"],
.oap-content-columns [class*="sidebar"],
.oap-content-columns [class*="share-btn"],
.oap-content-columns [class*="whatsapp"],
.oap-content-columns a[href*="whatsapp"],
.oap-content-columns .post-edit-link,
.oap-content-columns .edit-link {
    display: none !important;
}

/* ===== PRINT ===== */
@media print {
    .oap-actions,
    .oap-share-buttons,
    .oap-share-dropdown,
    .oap-clip-controls,
    .oap-clip-actions,
    .oap-share-row,
    .oap-trending-bar,
    .oap-cp-nav,
    .oap-cp-toolbar,
    .oap-cp-share,
    .oap-cp-trend,
    .oap-cp-status,
    .oap-btn,
    .oap-cp-btn,
    .oap-cb {
        display: none !important;
    }

    html, body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .oap-cp-page {
        padding: 0 !important;
        max-width: 100% !important;
    }

    .oap-cp-clip {
        border: none !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .oap-newspaper-clip {
        max-width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        overflow: visible;
    }

    .oap-page-info,
    .oap-header,
    .oap-meta-bar,
    .oap-footer,
    .oap-footer-dots span,
    .oap-layout-social-epaper .oap-social-footer,
    .oap-layout-social-epaper .oap-social-footer-logo,
    .oap-layout-social-epaper .oap-social-rule,
    .oap-layout-social-epaper .oap-oneclick-credit {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .oap-content-columns p {
        break-inside: avoid;
    }

    .oap-content-columns h2,
    .oap-content-columns h3,
    .oap-content-columns h4 {
        break-after: avoid;
    }
}
