/**
 * Custom Product Validation - Frontend Styles
 */

/* Match verified popup card + desktop backdrop (full screen fill on mobile) */
:root {
    --cpv-backdrop-bg: #282828;
    --cpv-popup-card-bg: #101014;
}

html.cpv-popup-active,
body.cpv-popup-active {
    background-color: var(--cpv-backdrop-bg) !important;
}

html.cpv-popup-active {
    height: 100%;
    height: -webkit-fill-available;
}

.cpv-validation-wrapper {
    max-width: 600px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.cpv-validation-form {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 8px;
    gap: 15px;
    flex-wrap: wrap;
}

.cpv-label {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    white-space: nowrap;
}

.cpv-arrow {
    font-size: 18px;
    color: #FFD08E;
}

.cpv-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 0;
    font-size: 15px;
    border: none;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 2px solid #fff;
    background: transparent;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
    box-shadow: none;
}

.cpv-input:focus {
    border-bottom-color: #FFD08E;
}

.cpv-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-family: monospace;
}

.cpv-button {
    padding: 18px 20px;
    background: linear-gradient(180deg, #F2C35A 0%, #D4A12F 50%, #B8841A 100%) !important;
    color: #1a1510 !important;
    border: none !important;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.cpv-button:hover {
    background: linear-gradient(180deg, #F2C35A 0%, #D4A12F 50%, #B8841A 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
    border: none !important;
}

.cpv-button:active {
    transform: translateY(0);
}

.cpv-button:disabled {
    background: #999;
    cursor: not-allowed;
    transform: none;
}

.cpv-message {
    margin-top: 15px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.cpv-message.cpv-error {
    background: #fee;
    color: #c33;
    border: 1px solid #fcc;
    display: block;
}

.cpv-message.cpv-success {
    background: #efe;
    color: #3c3;
    border: 1px solid #cfc;
    display: block;
}

/* Popup Styles */
.cpv-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    z-index: 999999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

/* Same solid tone as desktop behind dim overlay (no white gaps on iOS/Android) */
#cpv-shared-popup.cpv-popup-verified {
    background-color: var(--cpv-backdrop-bg);
}

.cpv-popup.cpv-popup-open {
    display: flex !important;
}

body.cpv-popup-active {
    overflow: hidden !important;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    height: auto;
    position: relative;
}

.cpv-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: -1;
}

.cpv-popup-content {
    position: relative;
    background: linear-gradient(to bottom, #FFD08E 0%, #FFC770 100%);
    padding: 0;
    border-radius: 24px;
    max-width: 750px;
    width: 100%;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
    animation: cpvSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
    overflow: hidden;
    margin: auto;
}

.cpv-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    line-height: 30px;
    text-align: center;
    transition: all 0.3s ease;
    z-index: 10;
    border-radius: 50%;
    background: rgba(108, 117, 125, 0.1);
}

.cpv-popup-verified .cpv-popup-close:hover {
    color: #000000 !important;
    background: rgb(255 255 255) !important;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.cpv-popup-logo {
    margin: 0 auto 20px;
    max-width: 140px;
    width: 100%;
    animation: cpvFadeIn 0.5s ease 0.5s both;
}

.cpv-popup-logo img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
}

.cpv-popup-shield {
    margin: 15px auto 15px;
    width: 90px;
    height: 90px;
    animation: cpvScaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
    filter: drop-shadow(0 8px 20px rgba(255, 160, 50, 0.4));
}

.cpv-popup-banner {
    background: linear-gradient(135deg, #FF9A3C 0%, #FFB45F 50%, #FFD08E 100%);
    color: #2c1810;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 3px;
    padding: 14px 40px;
    margin: 0 0 20px;
    animation: cpvFadeIn 0.5s ease 0.3s both;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
    position: relative;
}

.cpv-popup-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {

    0%,
    100% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(100%);
    }
}

.cpv-popup-message {
    margin: 0 0 20px;
    padding: 0 30px;
    animation: cpvFadeIn 0.5s ease 0.4s both;
}

.cpv-validation-title {
    font-size: 18px;
    color: #5a3d2b;
    margin: 0 0 5px;
    font-weight: 500;
}

.cpv-validation-title strong {
    color: #2c1810;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cpv-validation-subtitle {
    font-size: 15px;
    color: #6b4e3d;
    margin: 0;
    font-weight: 400;
}

.cpv-popup-product-section {
    margin: 0 0 20px;
    padding: 0 30px;
    animation: cpvFadeIn 0.5s ease 0.5s both;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    align-items: start;
}

.cpv-popup-left-column {
    display: flex;
    flex-direction: column;
}

.cpv-popup-right-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cpv-popup-product-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 14px;
    margin: 0;
    display: block;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border: 3px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
}

.cpv-popup-product-image:hover {
    transform: scale(1.02);
}

/* Custom Fields Container */
.cpv-popup-custom-fields {
    margin-bottom: 20px;
}

.cpv-popup-detail-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 2px solid rgba(255, 208, 142, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.cpv-popup-detail-box:hover {
    border-color: rgba(255, 208, 142, 0.6);
    box-shadow: 0 4px 12px rgba(255, 154, 60, 0.2);
    transform: translateY(-2px);
}

.cpv-popup-detail-box:last-child {
    margin-bottom: 0;
}

.cpv-popup-detail-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FFD08E 0%, #FF9A3C 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 154, 60, 0.3);
}

.cpv-popup-detail-icon .dashicons {
    color: #2c1810;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.cpv-popup-detail-content {
    flex: 1;
    text-align: left;
}

.cpv-popup-detail-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cpv-popup-detail-value {
    font-size: 16px;
    color: #2c1810;
    font-weight: 700;
}

.cpv-popup-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cpv-popup-detail-item {
    background: rgba(255, 255, 255, 0.6);
    padding: 12px 16px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.cpv-popup-detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.cpv-popup-detail-item.cpv-detail-autograph {
    background: linear-gradient(135deg, #FF9A3C 0%, #FFB45F 100%);
    border: none;
    box-shadow: 0 6px 20px rgba(255, 154, 60, 0.4);
}

.cpv-popup-detail-item.cpv-detail-autograph .cpv-detail-label {
    color: rgba(44, 24, 16, 0.8);
    font-weight: 600;
}

.cpv-popup-detail-item.cpv-detail-autograph strong {
    color: #2c1810;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.cpv-popup-product-box {
    background: rgba(255, 255, 255, 0.6);
    padding: 12px 16px;
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cpv-detail-label {
    font-size: 11px;
    color: #6b4e3d;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.cpv-popup-product-box strong,
.cpv-popup-detail-item strong {
    color: #2c1810;
    font-size: 16px;
    font-weight: 600;
    display: block;
}

/* Ensure PRODUCT value is clearly visible (white) in verified popup */
.cpv-popup-verified .cpv-popup-product-box strong,
.cpv-popup-verified .cpv-popup-product-name,
#cpv-popup-product-name,
.cpv-popup-verified .cpv-popup-product-box .cpv-popup-product-name {
    color: #ffffff !important;
}

/* Ensure ICON COA event value is white in the ICON-COA popup (visible in verified popup) */
#icon-coa-popup-event,
.cpv-popup-verified #icon-coa-popup-event,
#icon-coa-popup-event strong,
.cpv-popup-verified #icon-coa-popup-event strong,
#icon-coa-popup-date,
.cpv-popup-verified #icon-coa-popup-date,
#icon-coa-popup-date strong,
.cpv-popup-verified #icon-coa-popup-date strong,
#icon-coa-detail-event-box .cpv-popup-detail-value,
.cpv-popup-verified #icon-coa-detail-event-box .cpv-popup-detail-value {
    color: #ffffff !important;
}

.cpv-popup-verify-another {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    color: #2c1810;
    border: none;
    padding: 14px 50px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: cpvFadeIn 0.5s ease 0.6s both;
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 15px 0 20px;
    position: relative;
    overflow: hidden;
}

.cpv-popup-verify-another::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cpv-popup-verify-another:hover::before {
    width: 300px;
    height: 300px;
}

.cpv-popup-verify-another:hover {
    background: linear-gradient(135deg, #B45309 0%, #D97706 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.4);
}

.cpv-popup-verify-another:active {
    transform: translateY(-1px);
}

/* ========== Verified Authentic popup (same as SS: dark card, gold, borders) ========== */
.cpv-popup-verified .cpv-popup-content,
.cpv-popup-verified .cpv-popup-verified-content {
    background-color: var(--cpv-popup-card-bg, #101014);
    background-image: none;
    background-size: auto;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 10px;
    max-width: 820px;
    width: 100%;
    padding: 0;
    text-align: left;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.cpv-popup-verified .cpv-popup-close {
    color: #b0b0b0;
    background: transparent;
    top: 5px !important;
    right: 5px !important;
}

.cpv-popup-verified .cpv-popup-close:hover {
    color: #000000;
    background: rgb(255 255 255);
}

.cpv-popup-verified .cpv-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px 20px;
}

.cpv-popup-verified .cpv-popup-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 1 auto;
}

.cpv-popup-verified .cpv-popup-shield {
    flex-shrink: 0;
    margin: 0;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpv-popup-verified .cpv-popup-shield img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cpv-popup-verified .cpv-popup-header-text {
    flex: 0 1 auto;
    text-align: left !important;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.cpv-popup-verified .cpv-popup-banner {
    background: transparent !important;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 0;
    margin: 0;
    text-shadow: none;
    line-height: 1.2;
    text-align: left !important;
    text-transform: uppercase;
}

.cpv-popup-verified .cpv-popup-banner::before {
    display: none;
}

.cpv-popup-verified .cpv-popup-header-divider {
    height: 1px;
    background: #FFD08E;
    /* Same vertical rhythm as space under the line to "Verification ID:" */
    margin: 8px 0;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
}

.cpv-popup-verified .cpv-popup-verification-id {
    color: #FFD08E !important;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-align: left !important;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

.cpv-popup-verified .cpv-popup-verification-id span {
    font-weight: 700;
    color: #FFD08E !important;
    letter-spacing: 0.14em;
}

.cpv-popup-verified .cpv-popup-logo {
    flex-shrink: 0;
    margin: 0;
    max-width: 120px;
}

.cpv-popup-verified .cpv-popup-logo img {
    filter: none;
}

.cpv-popup-divider {
    height: 1px;
    background: #FFD08E;
    margin: 0 28px;
}

.cpv-popup-verified .cpv-popup-product-section {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    padding: 24px 28px;
    margin: 0;
}

.cpv-popup-verified .cpv-popup-left-column {
    align-items: flex-start;
}

.cpv-popup-verified .cpv-popup-product-image {
    width: 100%;
    max-width: 220px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
    background: #2a2a2a;
}

.cpv-popup-verified .cpv-popup-product-image:hover {
    transform: none;
}

.cpv-popup-verified .cpv-popup-right-column {
    gap: 0;
}

.cpv-popup-verified .cpv-popup-custom-fields {
    margin-bottom: 0;
}

.cpv-popup-footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 28px;
    border-top: 1px solid rgba(255, 208, 142, 0.3);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 500;
}

.cpv-popup-footer-info span {
    color: #ffffff !important;
}

.cpv-footer-left, .cpv-footer-center, .cpv-footer-right {
    flex: 1;
}

.cpv-footer-left {
    text-align: left;
}

.cpv-footer-center {
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cpv-footer-right {
    text-align: right;
}

    .cpv-popup-verified .cpv-popup-detail-box {
    background: transparent;
    padding: 12px 0;
    margin: 0;
    border-radius: 0;
    border: none;
    /* Use 2px gold border for PDF consistency */
    border-bottom: 1px solid #FFD08E;
    box-shadow: none;
}

.cpv-popup-verified .cpv-popup-detail-box:hover {
    transform: none;
    box-shadow: none;
}

.cpv-popup-verified .cpv-popup-detail-box:last-of-type {
    border-bottom: none;
}

.cpv-popup-verified .cpv-popup-detail-icon {
    background: transparent;
    width: auto;
    height: auto;
    box-shadow: none;
}

    .cpv-popup-verified .cpv-popup-detail-icon .dashicons {
    color: #FFD08E;
}

.cpv-popup-verified .cpv-popup-detail-label {
    color: #e0e0e0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    line-height: 1.3;
    text-transform: uppercase;
}

.cpv-popup-verified .cpv-popup-detail-value {
    color: #b8b8b8;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
}

.cpv-popup-verified .cpv-popup-detail-item {
    background: transparent;
    padding: 12px 0;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
    display: flex;
    gap: 5px;
    align-items: center;
}

.cpv-popup-verified .cpv-popup-detail-item:hover {
    transform: none;
    box-shadow: none;
}

/* .cpv-popup-verified #cpv-detail-event-box::before, */
/* .cpv-popup-verified #icon-coa-detail-event-box::before { */
    /* content: '';
    display: block;
    height: 1px;
    background: #FFD08E;
    width: 100%;
    /* tighten spacing under the event divider */
    /* margin: 0 0 6px 0; */
/* }  */

.cpv-popup-verified .cpv-popup-detail-item.cpv-detail-autograph {
    background: transparent;
    border-bottom: 1px solid #FFD08E;
    box-shadow: none;
}

/* Ensure AUTOGRAPH value is clearly visible (white) in verified popup */
.cpv-popup-verified .cpv-popup-detail-item.cpv-detail-autograph strong,
.cpv-popup-verified .cpv-popup-detail-item.cpv-detail-autograph .cpv-popup-detail-value {
    color: #ffffff !important;
}

.cpv-popup-verified .cpv-popup-detail-item .cpv-detail-label,
.cpv-popup-verified .cpv-popup-product-box .cpv-detail-label {
    color: #e0e0e0;
    font-size: 11px;
}

.cpv-popup-verified .cpv-popup-detail-item .cpv-detail-label,
.cpv-popup-verified .cpv-popup-product-box .cpv-detail-label {
    color: #FFD08E !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    line-height: 1.3;
}

.cpv-popup-verified .cpv-popup-detail-item strong,
.cpv-popup-verified .cpv-popup-product-box strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
}

.cpv-popup-verified .cpv-popup-product-box {
    background: transparent;
    padding: 12px 0 12px;
    margin: 0;
    ;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cpv-popup-verified .cpv-popup-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px 28px 24px;
}

.cpv-popup-verified .cpv-popup-print,
.cpv-popup-verified .cpv-popup-verify-another {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #202020 !important;
    color: #f0f0f0 !important;
    border: 1px solid #FFD08E !important;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    margin: 0;
    box-shadow: none;
}

.cpv-popup-verified .cpv-popup-print::before,
.cpv-popup-verified .cpv-popup-verify-another::before {
    display: none;
}

.cpv-popup-verified .cpv-popup-print:hover,
.cpv-popup-verified .cpv-popup-verify-another:hover {
    background: #2a2a2a;
    border-color: #FFD08E;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(198, 138, 37, 0.3);
}

.cpv-popup-verified .cpv-popup-print:active,
.cpv-popup-verified .cpv-popup-verify-another:active {
    transform: translateY(0);
}

.cpv-popup-verified .cpv-icon-print {
    flex-shrink: 0;
}

/* Hide old message/subtitle in verified layout */
.cpv-popup-verified .cpv-popup-message {
    display: none;
}




@media (max-width: 600px) {
    .cpv-popup-verified .cpv-popup-content {
        max-width: calc(100vw - 24px);
        margin: 0 auto;
    }

    .cpv-popup-verified .cpv-popup-header {
        /* keep header items on a single row on narrow screens (logo + header-left) */
        flex-wrap: nowrap !important;
        padding: 16px 14px 12px;
        align-items: center !important;
        gap: 10px !important;
    }

    .cpv-popup-verified .cpv-popup-shield {
        width: 46px;
        height: 46px;
    }

    .cpv-popup-verified .cpv-popup-shield img {
        width: 100%;
        height: 100%;
    }

    .cpv-popup-verified .cpv-popup-banner {
        font-size: 12px !important;
        letter-spacing: 0.1em !important;
    }

    .cpv-popup-verified .cpv-popup-verification-id {
        font-size: 12px !important;
        font-weight: 700 !important;
        letter-spacing: 0.1em !important;
        line-height: 1.2 !important;
    }

    .cpv-popup-verified .cpv-popup-verification-id span {
        font-weight: 700 !important;
        letter-spacing: 0.1em !important;
    }

    .cpv-popup-verified .cpv-popup-logo {
        max-width: 56px;
    }

    /* Make logo and header-left sit on same line: constrain logo and allow header-left to shrink */
    .cpv-popup-verified .cpv-popup-logo {
        max-width: 56px !important;
        margin: 0 !important;
        flex: 0 0 auto !important;
    }

    .cpv-popup-verified .cpv-popup-logo img {
        width: 100%;
        height: auto;
    }

    .cpv-popup-verified .cpv-popup-header-left {
        flex: 1 1 auto !important;
        min-width: 0 !important; /* allow truncation/ellipsis inside */
    }

    .cpv-popup-divider {
        margin: 0 14px;
    }

    .cpv-popup-verified .cpv-popup-product-section {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 14px;
    }

    .cpv-popup-verified .cpv-popup-left-column {
        align-items: center;
    }

    .cpv-popup-verified .cpv-popup-product-image {
        width: min(100%, 145px);
        max-width: 145px;
        height: 145px;
        object-fit: cover;
    }

    /* Footer: single column, centered — hide time; brand then URL below */
    .cpv-popup-verified .cpv-popup-footer-info {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 16px 20px 18px !important;
        border-top-color: rgba(255, 208, 142, 0.35) !important;
    }

    .cpv-popup-verified .cpv-popup-footer-info .cpv-footer-left {
        display: none !important;
    }

    .cpv-popup-verified .cpv-popup-footer-info .cpv-footer-center,
    .cpv-popup-verified .cpv-popup-footer-info .cpv-footer-right {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
    }

    .cpv-popup-verified .cpv-popup-footer-info .cpv-footer-center {
        font-size: 13px !important;
        font-weight: 700 !important;
        letter-spacing: 0.08em !important;
        line-height: 1.3 !important;
        text-transform: none !important;
    }

    .cpv-popup-verified .cpv-popup-footer-info .cpv-footer-right .cpv-print-site-url,
    .cpv-popup-verified .cpv-popup-footer-info .cpv-footer-right {
        text-align: center !important;
    }

    .cpv-popup-verified .cpv-popup-footer-info .cpv-print-site-url {
        display: block !important;
        font-size: 11px !important;
        font-weight: 500 !important;
        letter-spacing: 0.02em !important;
        line-height: 1.4 !important;
        opacity: 0.88;
        word-break: break-all;
        max-width: 100%;
    }

    .cpv-popup-verified .cpv-popup-actions {
        padding: 12px 14px 16px;
        gap: 12px;
    }

    .cpv-popup-verified .cpv-popup-print,
    .cpv-popup-verified .cpv-popup-verify-another {
        padding: 10px 20px;
        font-size: 11px;
    }

    .cpv-popup-verified .cpv-popup-detail-label,
    .cpv-popup-verified .cpv-popup-product-box .cpv-detail-label {
        font-size: 10px !important;
    }

    .cpv-popup-verified .cpv-popup-detail-value,
    .cpv-popup-verified .cpv-popup-detail-item strong,
    .cpv-popup-verified .cpv-popup-product-box strong {
        font-size: 12px !important;
    }
}

/* Print: white page (paper) around certificate card — inner card stays dark */
@page {
    size: A4 portrait;
    margin: 0;
    background: #ffffff;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
        background: #ffffff;
    }

    /*
     * White page tone (like before); padding on html = printable margin.
     * Card (.cpv-popup-content) keeps solid #101014 + gold borders.
     */
    html {
        background-color: #ffffff !important;
        background-image: none !important;
        margin: 0 !important;
        padding: 6mm !important;
        box-sizing: border-box !important;
    }

    body {
        background-color: #ffffff !important;
        background-image: none !important;
        background-attachment: scroll !important;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    /*
     * Must override screen rules html.cpv-popup-active / body.cpv-popup-active
     * (higher specificity + !important dark) — otherwise mobile PDF stays gray.
     */
    html.cpv-popup-active,
    body.cpv-popup-active {
        background-color: #ffffff !important;
        background-image: none !important;
    }

    /* Hide everything except the popup */
    body > *:not(#cpv-shared-popup) {
        display: none !important;
    }

    /*
     * Do NOT use min-height: 100vh here — mobile print counts vh + content height
     * and often spills to a second blank/half page.
     */
    #cpv-shared-popup.cpv-popup-verified {
        background-color: #ffffff !important;
        background-image: none !important;
    }

    #cpv-shared-popup {
        display: flex !important;
        flex-direction: column !important;
        visibility: visible !important;
        align-items: center !important;
        justify-content: flex-start !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        background: #ffffff !important;
        background-image: none !important;
        z-index: 999999 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;
    }

    #cpv-shared-popup * {
        visibility: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide overlay in print (no dim layer / layout shift) */
    #cpv-shared-popup .cpv-popup-overlay {
        display: none !important;
    }

    /*
     * Center card without transform (mobile print engines often break translate(-50%,-50%)).
     * Inline bg image on .cpv-popup-verified-content must be cleared for print.
     */
    /*
     * Beat mobile rule `#cpv-shared-popup .cpv-popup-content { max-height; overflow-y: auto }`
     * or the footer is clipped and does not appear in PDF (URL, time, brand).
     */
    #cpv-shared-popup .cpv-popup-content,
    #cpv-shared-popup .cpv-popup-content.cpv-popup-verified-content {
        display: block !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: none !important;
        height: auto !important;
        margin: 0 auto !important;
        background-color: var(--cpv-popup-card-bg, #101014) !important;
        background-image: none !important;
        background-size: auto !important;
        border: 1px solid #FFD08E !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        padding: 0 !important;
        overflow: visible !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: auto !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        box-sizing: border-box !important;
    }

    /* Force layouts — compact for one printed page */
    .cpv-popup-verified .cpv-popup-header {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 14px 8px !important;
        gap: 8px !important;
    }

    .cpv-popup-verified .cpv-popup-shield {
        width: 48px !important;
        height: 48px !important;
    }

    .cpv-popup-verified .cpv-popup-logo {
        max-width: 72px !important;
    }

    .cpv-popup-verified .cpv-popup-banner {
        font-size: 13px !important;
        letter-spacing: 0.08em !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .cpv-popup-verified .cpv-popup-verification-id {
        font-size: 13px !important;
        font-weight: 700 !important;
        letter-spacing: 0.08em !important;
        line-height: 1.2 !important;
    }

    .cpv-popup-verified .cpv-popup-verification-id span {
        font-weight: 700 !important;
        letter-spacing: 0.08em !important;
    }

    .cpv-popup-verified .cpv-popup-header-left {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        min-width: 0 !important;
    }

    /*
     * Two columns in print: shorter total height than stacked = fits one A4 page more often.
     */
    .cpv-popup-verified .cpv-popup-product-section {
        display: grid !important;
        grid-template-columns: 110px 1fr !important;
        gap: 10px 12px !important;
        padding: 10px 14px !important;
        margin: 0 !important;
        justify-items: stretch !important;
        align-items: start !important;
        text-align: left !important;
    }

    .cpv-popup-verified .cpv-popup-left-column,
    .cpv-popup-verified .cpv-popup-right-column {
        width: 100% !important;
        max-width: 100% !important;
        align-items: flex-start !important;
    }

    .cpv-popup-verified .cpv-popup-left-column {
        justify-self: center !important;
    }

    /* Stretch text column so borders match PRODUCT row width (PDF) */
    .cpv-popup-verified .cpv-popup-right-column {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-self: stretch !important;
        justify-content: flex-start !important;
        min-width: 0 !important;
        grid-column: 2 !important;
    }

    .cpv-popup-verified .cpv-popup-detail-item.cpv-detail-autograph {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        align-self: stretch !important;
        box-sizing: border-box !important;
        flex-wrap: wrap !important;
        border-bottom: 1px solid #FFD08E !important;
    }

    .cpv-popup-verified .cpv-popup-product-box {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        align-self: stretch !important;
    }

    .cpv-popup-verified .cpv-popup-product-image {
        max-width: 110px !important;
        width: 110px !important;
        height: 110px !important;
        object-fit: cover !important;
        margin: 0 !important;
    }

    .cpv-popup-verified .cpv-popup-detail-box {
        padding: 6px 0 !important;
    }

    .cpv-popup-verified .cpv-popup-detail-label {
        font-size: 9px !important;
        margin-bottom: 2px !important;
    }

    .cpv-popup-verified .cpv-popup-detail-value,
    .cpv-popup-verified .cpv-popup-detail-item strong,
    .cpv-popup-verified .cpv-popup-product-box strong {
        font-size: 11px !important;
        line-height: 1.35 !important;
    }

    .cpv-popup-verified .cpv-popup-detail-item,
    .cpv-popup-verified .cpv-popup-product-box {
        padding: 6px 0 !important;
    }

    /* Hide UI elements */
    .cpv-popup-verified .cpv-popup-close,
    .cpv-popup-verified .cpv-popup-actions,
    .cpv-popup-overlay,
    #cpv-shared-loading {
        display: none !important;
    }

    /* Ensure text colors are preserved */
    .cpv-popup-verified .cpv-popup-banner {
        color: #ffffff !important;
    }
    .cpv-popup-verified .cpv-popup-verification-id,
    .cpv-popup-verified .cpv-popup-verification-id span {
        color: #FFD08E !important;
    }
    .cpv-popup-verified .cpv-detail-label {
        color: #FFD08E !important;
    }
    .cpv-popup-verified strong,
    .cpv-popup-verified .cpv-popup-detail-value {
        color: #ffffff !important;
    }

    /* Force visibility of dividers in print */
    .cpv-popup-header-divider,
    .cpv-popup-divider {
        display: block !important;
        visibility: visible !important;
        height: 1px !important;
        background-color: #FFD08E !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .cpv-popup-header-divider {
        margin: 8px 0 !important;
        width: 100% !important;
    }

    .cpv-popup-verified .cpv-popup-banner {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Full card width (screen uses horizontal inset; PDF line should match outer border) */
    .cpv-popup-verified .cpv-popup-divider {
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Footer info in print */
    .cpv-popup-footer-info {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 4px 8px !important;
        padding: 8px 14px !important;
        border-top: 1px solid #FFD08E !important;
        color: #ffffff !important;
        font-size: 10px !important;
        font-weight: 500 !important;
        overflow: visible !important;
        min-height: 0 !important;
        page-break-inside: avoid !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .cpv-popup-footer-info span {
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .cpv-footer-left { text-align: left !important; }
    .cpv-footer-center { text-align: center !important; font-weight: 600 !important; }
    .cpv-footer-right { text-align: right !important; }

    .cpv-print-site-url {
        word-break: break-all !important;
        display: inline-block !important;
        max-width: 100% !important;
        color: #ffffff !important;
    }

    /* Force all text white in print except gold IDs */
    .cpv-popup-verified strong,
    .cpv-popup-verified .cpv-popup-detail-value,
    .cpv-popup-verified .cpv-footer-center,
    .cpv-popup-verified .cpv-footer-left,
    .cpv-popup-verified .cpv-footer-right,
    .cpv-popup-verified .cpv-footer-center span,
    .cpv-popup-verified .cpv-footer-left span,
    .cpv-popup-verified .cpv-footer-right span,
    .cpv-popup-verified .cpv-popup-banner {
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* Animations */
@keyframes cpvFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cpvSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cpvScaleIn { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }

/* Loading Screen */
.cpv-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    z-index: 1000000000;
    display: none;
    align-items: center;
    justify-content: center;
    background-color: var(--cpv-backdrop-bg);
}

.cpv-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.cpv-loading-content {
    position: relative;
    background: linear-gradient(to bottom, #FFD08E 0%, #FFC770 100%);
    padding: 60px 80px;
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
    z-index: 2;
    min-width: 320px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
}

.cpv-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 25px;
    border: 4px solid rgba(217, 119, 6, 0.2);
    border-top: 4px solid #D97706;
    border-radius: 50%;
    animation: cpvSpin 1s linear infinite;
}

@keyframes cpvSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.cpv-loading-text {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #2c1810;
    letter-spacing: 0.5px;
    text-align: center;
    padding: 0 12px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 600px) {
    .cpv-loading-content {
        min-width: 0;
        width: calc(100vw - 32px);
        padding: 36px 20px;
    }

    .cpv-loading-text {
        font-size: 16px;
        padding: 0 10px;
    }

    .cpv-validation-form {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .cpv-label {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        white-space: normal;
        text-align: center;
    }

    /* → points right on desktop; on mobile point down toward the input */
    .cpv-validation-form .cpv-arrow {
        display: inline-block;
        transform: rotate(90deg);
        line-height: 1;
    }

    .cpv-input {
        width: 100%;
        min-width: auto;
    }

    .cpv-button {
        width: 100%;
    }

    .cpv-popup-content {
        padding: 30px 20px 25px;
    }

    .cpv-popup-product-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cpv-popup-left-column {
        align-items: center;
    }

    .cpv-popup-right-column {
        gap: 12px;
    }

    .cpv-popup-product-image {
        max-width: 180px;
    }

    .cpv-popup-details-grid {
        grid-template-columns: 1fr;
    }

    #cpv-shared-popup .cpv-popup-content {
        max-height: calc(100vh - 40px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #cpv-shared-popup {
        align-items: center !important;
        justify-content: center !important;
        padding-top: 0 !important;
    }
}


div#cpv-detail-event-box, div#icon-coa-detail-event-box {
    border-top: 1px solid #FFD08E !important;
    border-bottom: 1px solid #FFD08E !important;
    display: flex ;
    align-items: center;
    gap:5px;
}
