.wdh-pdf-showcase{font-family:inherit;color:#171717}
.wdh-pdf-head{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:28px}
.wdh-pdf-head h2{margin:0 0 8px;font-size:32px}
.wdh-pdf-head p{margin:0;color:#666;max-width:720px}
.wdh-pdf-search{width:280px;max-width:100%;padding:13px 16px;border:1px solid #ddd;border-radius:10px;font-size:15px;background:#fff}
.wdh-pdf-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.wdh-pdf-card{border:1px solid #e4e4e4;background:#fff;border-radius:14px;padding:20px;text-align:left;cursor:pointer;min-height:145px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;transition:.18s;box-shadow:0 3px 12px rgba(0,0,0,.04)}
.wdh-pdf-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.09);border-color:#bbb}
.wdh-pdf-icon{font-weight:800;font-size:14px;padding:7px 9px;border-radius:7px;background:#f2f2f2}
.wdh-pdf-name{font-size:15px;line-height:1.35;font-weight:650;word-break:break-word}
.wdh-pdf-open{font-size:13px;text-decoration:underline;color:#555;margin-top:auto}
.wdh-pdf-empty,.wdh-pdf-error{padding:25px;border:1px solid #eee;border-radius:12px;background:#fafafa}
.wdh-pdf-modal{display:none;position:fixed;inset:0;z-index:999999}
.wdh-pdf-modal.is-open{display:block}
.wdh-pdf-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.72)}
.wdh-pdf-dialog{position:relative;width:min(1120px,94vw);height:min(94vh,920px);margin:3vh auto;background:#fff;border-radius:16px;overflow:auto;box-shadow:0 20px 70px rgba(0,0,0,.35);padding:22px}
.wdh-pdf-close{position:absolute;right:14px;top:10px;border:0;background:transparent;font-size:34px;line-height:1;cursor:pointer;z-index:3}
.wdh-pdf-title{font-size:21px;font-weight:750;padding:0 45px 16px 0;word-break:break-word}
.wdh-pdf-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px;border-bottom:1px solid #eee;background:#fafafa;border-radius:10px 10px 0 0}
.wdh-pdf-toolbar button{border:1px solid #ddd;background:#fff;border-radius:8px;padding:8px 12px;cursor:pointer}
.wdh-page-input{width:70px;padding:8px;border:1px solid #ccc;border-radius:7px}
.wdh-render-status{margin-left:auto;color:#777;font-size:13px}
.wdh-canvas-wrap{min-height:300px;display:flex;justify-content:center;align-items:flex-start;padding:18px;background:#eee;overflow:auto}
.wdh-pdf-canvas{background:#fff;max-width:100%;height:auto;box-shadow:0 2px 12px rgba(0,0,0,.16)}
.wdh-pdf-order-box{padding:18px 0 4px}
.wdh-selected-info{display:grid;grid-template-columns:1fr 180px;gap:10px;padding:12px 14px;background:#f8f8f8;border-radius:10px;margin-bottom:14px}
.wdh-size-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.wdh-size-grid label{font-size:14px;font-weight:650}
.wdh-size-grid input{display:block;width:100%;box-sizing:border-box;margin-top:6px;padding:12px;border:1px solid #ccc;border-radius:8px}
.wdh-calc-row{display:flex;justify-content:space-between;gap:15px;padding:15px 0;font-size:15px}
.wdh-price{font-size:20px}
.wdh-min-note{font-size:13px;color:#777;margin-bottom:12px}
.wdh-add-cart{width:100%;padding:14px 18px;border:0;border-radius:9px;background:#111;color:#fff;font-weight:700;cursor:pointer}
.wdh-add-cart:disabled{opacity:.45;cursor:not-allowed}
.wdh-add-status{padding-top:10px;font-size:14px;color:#555;min-height:20px}
body.wdh-modal-open{overflow:hidden}
@media(max-width:900px){.wdh-pdf-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.wdh-pdf-head{display:block}.wdh-pdf-search{margin-top:15px;width:100%}.wdh-pdf-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wdh-pdf-dialog{width:96vw;height:96vh;margin:2vh auto;padding:14px}.wdh-selected-info{grid-template-columns:1fr}.wdh-size-grid{grid-template-columns:1fr}.wdh-render-status{margin-left:0}}

/* PDF cover thumbnails */
.wdh-pdf-cover{width:100%;height:205px;background:#f2f2f2;border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:center;position:relative}
.wdh-pdf-thumb{display:block;width:100%;height:100%;object-fit:contain;background:#fff}
.wdh-pdf-cover-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:13px;color:#777;background:#f5f5f5}
.wdh-cover-ready .wdh-pdf-cover-loading{display:none}
.wdh-pdf-card{padding:12px}
.wdh-pdf-card .wdh-pdf-name{padding:2px 4px 0}
.wdh-pdf-card .wdh-pdf-open{padding:0 4px 3px}

/* Explicit button text color so theme styles cannot hide the labels */
.wdh-pdf-toolbar button,
.wdh-pdf-back,
.wdh-page-prev,
.wdh-page-next{color:#222 !important;background:#fff !important;font-weight:650 !important;text-shadow:none !important;opacity:1 !important}
.wdh-pdf-toolbar{color:#222}
.wdh-page-label{color:#222;font-weight:650}
.wdh-page-count{color:#222}
.wdh-render-status{color:#555}
.wdh-pdf-back{margin-right:auto}
@media(max-width:650px){
    .wdh-pdf-cover{height:170px}
    .wdh-pdf-back{width:100%;margin-right:0}
}

/* Prevent theme buttons from hiding viewer labels */
.wdh-pdf-toolbar .wdh-pdf-back,
.wdh-pdf-toolbar .wdh-page-prev,
.wdh-pdf-toolbar .wdh-page-next{display:inline-flex !important;align-items:center !important;justify-content:center !important;visibility:visible !important}
.wdh-pdf-card .wdh-pdf-cover{display:flex !important}

/* Final fix: force toolbar button labels to remain visible */
.wdh-pdf-showcase .wdh-pdf-toolbar button .wdh-btn-text{
    display:inline-block !important;
    visibility:visible !important;
    opacity:1 !important;
    color:#222 !important;
    background:transparent !important;
    font-size:14px !important;
    font-family:inherit !important;
    font-weight:700 !important;
    line-height:1.2 !important;
    text-indent:0 !important;
    letter-spacing:normal !important;
    white-space:nowrap !important;
    width:auto !important;
    height:auto !important;
    overflow:visible !important;
    clip:auto !important;
    clip-path:none !important;
    position:static !important;
}
.wdh-pdf-showcase .wdh-pdf-toolbar .wdh-pdf-back .wdh-btn-text,
.wdh-pdf-showcase .wdh-pdf-toolbar .wdh-page-prev .wdh-btn-text,
.wdh-pdf-showcase .wdh-pdf-toolbar .wdh-page-next .wdh-btn-text{
    color:#222 !important;
}


/* v1.2.5: use button pseudo-labels as a theme-proof fallback */
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-pdf-back,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-prev,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-next{
    font-size:14px !important;
    min-width:150px !important;
    min-height:42px !important;
    color:#222 !important;
    background:#fff !important;
    overflow:visible !important;
    text-indent:0 !important;
}
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-pdf-back::before,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-prev::before,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-next::before{
    display:block !important;
    visibility:visible !important;
    opacity:1 !important;
    position:static !important;
    clip:auto !important;
    clip-path:none !important;
    color:#222 !important;
    background:transparent !important;
    font-family:Arial, sans-serif !important;
    font-size:14px !important;
    font-weight:700 !important;
    line-height:20px !important;
    text-indent:0 !important;
    letter-spacing:0 !important;
    white-space:nowrap !important;
    width:auto !important;
    height:auto !important;
    overflow:visible !important;
}
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-pdf-back::before{content:"← Back to Designs" !important;}
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-prev::before{content:"← Previous Page" !important;}
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-next::before{content:"Next Page →" !important;}
/* Keep the real span out of the way; the pseudo-label is the reliable visible label. */
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-pdf-back .wdh-btn-text,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-prev .wdh-btn-text,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-next .wdh-btn-text{
    display:none !important;
}

/* v1.2.6 cache-busted final label fix */
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-pdf-back .wdh-btn-text,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-prev .wdh-btn-text,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-next .wdh-btn-text{
 display:inline !important;
 visibility:visible !important;
 opacity:1 !important;
 color:#222 !important;
 font-family:Arial,sans-serif !important;
 font-size:14px !important;
 font-weight:700 !important;
 line-height:20px !important;
 white-space:nowrap !important;
 position:static !important;
 width:auto !important; height:auto !important;
 clip:auto !important; clip-path:none !important;
 overflow:visible !important;
 text-indent:0 !important;
}
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-pdf-back::before,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-prev::before,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-next::before{display:none !important;content:none !important;}
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-pdf-back,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-prev,
.wdh-pdf-showcase .wdh-pdf-toolbar button.wdh-page-next{
 display:inline-flex !important; visibility:visible !important; opacity:1 !important;
 align-items:center !important; justify-content:center !important;
 min-width:150px !important; min-height:42px !important;
 color:#222 !important; background:#fff !important;
 font-size:14px !important; text-indent:0 !important;
}

.wdh-pdf-cover { position: relative; display:block; overflow:hidden; }
.wdh-pdf-cover-img { display:block; width:100%; height:100%; object-fit:cover; }
.wdh-pdf-cover-loading { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }


/* v1.2.8: cover-first Showcase. PDF is opened only when the customer clicks the cover. */
.wdh-pdf-cover-link{display:block;width:100%;text-decoration:none;color:inherit}
.wdh-pdf-cover-link:focus-visible{outline:3px solid #111;outline-offset:3px;border-radius:10px}
.wdh-pdf-open{border:0;background:transparent;text-decoration:underline;color:#555;padding:0 4px 3px;cursor:pointer;font:inherit}
.wdh-pdf-card{cursor:default}
.wdh-pdf-card:hover{cursor:default}
.wdh-pdf-opening{position:fixed;inset:0;z-index:1000000;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.72)}
.wdh-pdf-opening.is-visible{display:flex}
.wdh-pdf-opening-box{background:#fff;border-radius:14px;padding:26px 30px;text-align:center;box-shadow:0 20px 70px rgba(0,0,0,.35);min-width:250px}
.wdh-pdf-opening-text{font-weight:750;font-size:17px;margin-top:12px}
.wdh-pdf-loading{position:absolute;inset:0;z-index:10;display:none;align-items:center;justify-content:center;background:rgba(255,255,255,.92);border-radius:12px}
.wdh-pdf-loading.is-visible{display:flex}
.wdh-pdf-loading-box{width:min(390px,86%);text-align:center;background:#fff;border:1px solid #e7e7e7;border-radius:16px;padding:28px 24px;box-shadow:0 16px 50px rgba(0,0,0,.14)}
.wdh-pdf-loading-spinner{width:42px;height:42px;margin:0 auto 14px;border:4px solid #ddd;border-top-color:#111;border-radius:50%;animation:wdhPdfSpin .8s linear infinite}
.wdh-pdf-loading-title{font-size:18px;font-weight:750;color:#171717}
.wdh-pdf-loading-percent{font-size:14px;color:#555;margin-top:7px;font-weight:700}
.wdh-pdf-loading-track{height:8px;background:#e9e9e9;border-radius:999px;overflow:hidden;margin-top:14px}
.wdh-pdf-loading-bar{display:block;width:0;height:100%;background:#111;border-radius:999px;transition:width .15s ease}
.wdh-pdf-loading-note{font-size:13px;color:#777;margin-top:10px}
@keyframes wdhPdfSpin{to{transform:rotate(360deg)}}
.wdh-pdf-dialog{position:relative}
