.encypher-c2pa-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #1b2f50;
    font: 500 14px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.encypher-c2pa-badge--small {
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
}

.encypher-c2pa-badge:hover {
    border-color: #2a87c4;
    box-shadow: 0 2px 8px rgba(27, 47, 80, 0.14);
}

.encypher-c2pa-badge:focus-visible,
.encypher-c2pa-modal-close:focus-visible,
.encypher-verification-retry:focus-visible {
    outline: 2px solid #2a87c4;
    outline-offset: 2px;
}

.encypher-c2pa-badge__icon {
    display: block;
    flex: 0 0 auto;
}

.encypher-c2pa-badge__check[hidden] {
    display: none;
}

.encypher-c2pa-badge-verified,
.encypher-c2pa-badge-signed {
    color: #0f5132;
    border-color: #8bc69e;
}

.encypher-c2pa-badge-changed_after_signing {
    color: #744b00;
    border-color: #dba617;
}

.encypher-c2pa-badge-verification_unavailable {
    color: #475569;
    border-color: #a7aaad;
}

.encypher-c2pa-badge-wrapper {
    width: 100%;
}

.encypher-c2pa-badge-top {
    margin: 0 0 24px;
}

.encypher-c2pa-badge-bottom {
    margin: 32px 0 48px;
}

.encypher-c2pa-badge-floating {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
}

.encypher-c2pa-modal[hidden] {
    display: none;
}

.encypher-c2pa-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.encypher-c2pa-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.encypher-c2pa-modal-content {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    color: #1e293b;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 64px rgba(15, 23, 42, 0.32);
}

.encypher-c2pa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #dbe3ec;
}

.encypher-c2pa-modal-logo {
    width: auto;
    height: 28px;
}

.encypher-c2pa-modal-close {
    display: inline-grid;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #475569;
    font-size: 30px;
    line-height: 1;
    place-items: center;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.encypher-c2pa-modal-close:hover {
    color: #1b2f50;
    background: #f1f5f9;
}

.encypher-c2pa-modal-body {
    padding: 22px;
}

.encypher-c2pa-modal-body h2 {
    margin: 0 0 6px;
    color: #1b2f50;
    font-size: 23px;
    line-height: 1.25;
}

.encypher-c2pa-modal-description {
    margin: 0 0 20px;
    color: #64748b;
}

.encypher-c2pa-modal-loading {
    padding: 28px 0;
    text-align: center;
}

.encypher-c2pa-loader {
    display: block;
    width: 38px;
    height: 38px;
    margin: 0 auto 12px;
}

.encypher-verification-state {
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.encypher-verification-state__mark {
    display: block;
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
}

.encypher-verification-state h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.encypher-verification-state p {
    margin: 0;
}

.encypher-verification-state--verified {
    color: #0f5132;
    background: #e9f7ef;
    border-color: #b7e1c8;
}

.encypher-verification-state--changed {
    color: #744b00;
    background: #fff8e1;
    border-color: #f2d16b;
}

.encypher-verification-state--unavailable {
    color: #475569;
    background: #f8fafc;
}

.encypher-verification-facts {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px 14px;
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid #dbe3ec;
}

.encypher-verification-facts dt {
    color: #64748b;
    font-weight: 600;
}

.encypher-verification-facts dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.encypher-verification-retry {
    min-height: 42px;
    margin-top: 16px;
    padding: 8px 16px;
    color: #fff;
    font: inherit;
    font-weight: 600;
    background: #1b2f50;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.encypher-verification-retry:hover {
    background: #24416f;
}

body.encypher-c2pa-dialog-open {
    overflow: hidden;
}

@media (max-width: 600px) {
    .encypher-c2pa-modal {
        align-items: end;
        padding: 0;
    }

    .encypher-c2pa-modal-content {
        width: 100%;
        max-height: 90vh;
        border-radius: 12px 12px 0 0;
    }

    .encypher-c2pa-badge-floating {
        right: 12px;
        bottom: 12px;
    }

    .encypher-verification-facts {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .encypher-verification-facts dd + dt {
        margin-top: 8px;
    }
}

@media print {
    .encypher-c2pa-badge-floating,
    .encypher-c2pa-modal {
        display: none !important;
    }
}

/* ------------------------------------------------------------------ */
/* Whitelabel brand logo (badge + modal) and Powered by Encypher link */
/* ------------------------------------------------------------------ */

.encypher-c2pa-badge__icon--brand {
    object-fit: contain;
}

.encypher-c2pa-modal-logo--brand {
    width: auto;
    max-height: 28px;
    object-fit: contain;
}

.encypher-c2pa-modal-brand-logo {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.encypher-c2pa-modal-powered-by {
    margin: 16px 0 0;
    text-align: center;
}

.encypher-c2pa-modal-powered-by a {
    color: #6b7280;
    font-size: 12px;
    text-decoration: none;
}

.encypher-c2pa-modal-powered-by a:hover,
.encypher-c2pa-modal-powered-by a:focus-visible {
    color: #2a87c4;
    text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Reader image verification overlay: a small floating corner button  */
/* positioned over content images (never reparented, so no layout     */
/* shift). Mirrors the Chrome extension's image badge visual language. */
/* ------------------------------------------------------------------ */

.encypher-c2pa-media-badge {
    position: absolute;
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(27, 47, 80, 0.15);
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 1px 4px rgba(27, 47, 80, 0.25);
    line-height: 0;
    cursor: pointer;
    opacity: 0.92;
    z-index: 9998;
    transform: rotate(-45deg);
    transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.encypher-c2pa-media-badge:hover,
.encypher-c2pa-media-badge:focus-visible {
    opacity: 1;
    box-shadow: 0 2px 8px rgba(27, 47, 80, 0.35);
}

.encypher-c2pa-media-badge:focus-visible {
    outline: 2px solid #2a87c4;
    outline-offset: 2px;
}

.encypher-c2pa-media-badge__icon,
.encypher-c2pa-media-badge__logo {
    display: block;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
}

.encypher-c2pa-media-badge__logo {
    object-fit: contain;
    border-radius: 50%;
}

@media print {
    .encypher-c2pa-media-badge {
        display: none !important;
    }
}
