/* ============================================================
   PCS Screen — assets batch
   Screen-specific polish on top of pcs-admin-bridge.css.
   Owned by the "assets" redesign pass — keep all rules scoped under
   body.pcs-admin-skin and the screen's own container class.
   Screens: Cliparts, Fonts, Frontend Translate.
   ============================================================ */

/* ---- Section sub-headings (Custom Fonts / Google Fonts) ---- */
body.pcs-admin-skin .pcs-wrap > h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--pcs-text, #1d2327);
    margin: 4px 0 12px;
}

/* ---- Panel headings inside cards ---------------------------- */
body.pcs-admin-skin .pcs-wrap .postbox.pcs-card > h3,
body.pcs-admin-skin .pcs-wrap .postbox.pcs-card .inside > h3,
body.pcs-admin-skin .pcs-wrap #nbd-list-arts > h3,
body.pcs-admin-skin .pcs-wrap #nbd-list-fonts > h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--pcs-text, #1d2327);
}

/* Keep the pcs-card accent bar from clipping inline category editors */
body.pcs-admin-skin .pcs-wrap .nbdesigner-content-side .postbox.pcs-card,
body.pcs-admin-skin .pcs-wrap #nbd-list-arts.pcs-card,
body.pcs-admin-skin .pcs-wrap #nbd-list-fonts.pcs-card {
    overflow: visible;
}

/* ---- Clipart / font list containers ------------------------- */
body.pcs-admin-skin .pcs-wrap .nbdesigner-list-arts-container,
body.pcs-admin-skin .pcs-wrap .nbdesigner-list-fonts-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 4px 0 8px;
}
body.pcs-admin-skin .pcs-wrap .nbdesigner_art_link,
body.pcs-admin-skin .pcs-wrap .nbdesigner_google_link {
    border: 1px solid var(--pcs-border-light, #dcdcde);
    border-radius: var(--pcs-radius-sm, 8px);
    background: var(--pcs-bg, #fff);
    transition: border-color .12s, box-shadow .12s;
}
body.pcs-admin-skin .pcs-wrap .nbdesigner_art_link:hover,
body.pcs-admin-skin .pcs-wrap .nbdesigner_google_link:hover {
    border-color: var(--pcs-primary, #3b4fd8);
    box-shadow: var(--pcs-shadow-sm, 0 1px 2px rgba(0,0,0,.05));
}

/* ---- Category list rows ------------------------------------- */
body.pcs-admin-skin .pcs-wrap #nbdesigner_list_art_cats > li,
body.pcs-admin-skin .pcs-wrap #nbdesigner_list_cats > li {
    padding: 6px 0;
    border-bottom: 1px solid var(--pcs-border-subtle, #f0f0f1);
}

/* ============================================================
   Frontend Translate
   ============================================================ */
body.pcs-admin-skin .pcs-wrap .pcs-filter-row b {
    color: var(--pcs-text-soft, #50575e);
    font-weight: 600;
}
body.pcs-admin-skin .nbd-translate-list-card {
    overflow: visible;
    padding: 8px 4px;
    margin-top: 12px;
}
body.pcs-admin-skin .nbd-translate-list-card .nbdesigner-translate {
    margin: 0;
}
body.pcs-admin-skin .nbd-translate-list-card .nbdesigner-translate > li {
    border-bottom: 1px solid var(--pcs-border-subtle, #f0f0f1);
}
body.pcs-admin-skin .nbd-translate-list-card .nbdesigner-translate > li:last-child {
    border-bottom: none;
}
body.pcs-admin-skin .nbd-translate-list-card .click_edit {
    padding: 8px 10px;
    margin: 0;
    border-radius: var(--pcs-radius-sm, 8px);
    cursor: pointer;
    transition: background .12s;
}
body.pcs-admin-skin .nbd-translate-list-card .click_edit:hover {
    background: var(--pcs-primary-soft, #eef0fc);
    color: var(--pcs-primary, #3b4fd8);
}

/* ============================================================
   Cliparts — multi-file upload dropzone
   ============================================================ */
body.pcs-admin-skin .nbd-clipart-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 26px 16px;
    border: 2px dashed var(--pcs-border, #c3c4c7);
    border-radius: var(--pcs-radius-md, 10px);
    background: var(--pcs-bg-soft, #f6f7f7);
    text-align: center;
    cursor: pointer;
    transition: border-color .12s, background .12s;
}
body.pcs-admin-skin .nbd-clipart-dropzone.is-dragover,
body.pcs-admin-skin .nbd-clipart-dropzone:hover {
    border-color: var(--pcs-primary, #3b4fd8);
    background: var(--pcs-primary-soft, #eef0fc);
}
body.pcs-admin-skin .nbd-clipart-dropzone .dashicons-upload {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: var(--pcs-primary, #3b4fd8);
}
body.pcs-admin-skin .nbd-clipart-dropzone-text {
    margin: 0;
    color: var(--pcs-text-soft, #50575e);
    font-size: 13px;
}
/* Keep the native input accessible but let the whole zone act as the target */
body.pcs-admin-skin .nbd-clipart-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* ---- Selected-file preview list ---- */
body.pcs-admin-skin .nbd-clipart-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}
body.pcs-admin-skin .nbd-clipart-preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--pcs-border-light, #dcdcde);
    border-radius: var(--pcs-radius-sm, 8px);
    background: var(--pcs-bg, #fff);
}
body.pcs-admin-skin .nbd-clipart-preview-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: var(--pcs-radius-sm, 6px);
    background:
        linear-gradient(45deg, #eee 25%, transparent 25%, transparent 75%, #eee 75%, #eee) 0 0 / 12px 12px,
        linear-gradient(45deg, #eee 25%, #fff 25%, #fff 75%, #eee 75%, #eee) 6px 6px / 12px 12px;
    overflow: hidden;
}
body.pcs-admin-skin .nbd-clipart-preview-thumb img {
    max-width: 100%;
    max-height: 100%;
}
body.pcs-admin-skin .nbd-clipart-preview-name {
    font-size: 12px;
    color: var(--pcs-text-soft, #50575e);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   Cliparts — grids, empty state, badges
   ============================================================ */
body.pcs-admin-skin .pcs-wrap .nbdesigner_art_link img {
    display: block;
}
/* Empty state (My + Global) */
body.pcs-admin-skin .nbd-clipart-empty {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 36px 16px;
    text-align: center;
    color: var(--pcs-text-soft, #50575e);
}
body.pcs-admin-skin .nbd-clipart-empty .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--pcs-border, #c3c4c7);
}
body.pcs-admin-skin .nbd-clipart-empty-title {
    margin: 4px 0 0;
    font-weight: 600;
    color: var(--pcs-text, #1d2327);
}
body.pcs-admin-skin .nbd-clipart-empty-sub {
    margin: 0 0 8px;
    font-size: 13px;
}

/* Delete control on clipart cards was a <span> (styled via .nbdesigner_art_link
   > span). It is now a <button>, so replicate the absolute swatch + hover-reveal
   here. */
body.pcs-admin-skin .pcs-wrap .nbdesigner_art_link > button.nbdesigner_action_delete_art {
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e24949;
    color: #fff;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    -webkit-appearance: none;
    appearance: none;
}
body.pcs-admin-skin .pcs-wrap .nbdesigner_art_link:hover > button.nbdesigner_action_delete_art,
body.pcs-admin-skin .pcs-wrap .nbdesigner_art_link > button.nbdesigner_action_delete_art:focus-visible {
    opacity: 1;
}
body.pcs-admin-skin .pcs-wrap .nbdesigner_art_link > button.nbdesigner_action_delete_art:focus-visible {
    outline: 2px solid var(--pcs-primary, #3b4fd8);
    outline-offset: 1px;
}

/* View-mode toggles are now <button>; keep the 16px swatch look, drop UA chrome.
   Border/size come from admin-nbdesigner.css .nbd-toggle-art-view; we only
   neutralise the default button background and padding and restore the swatch
   colours (white base / black variant). */
body.pcs-admin-skin .pcs-wrap .nbd-toggle-art-view {
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
}
body.pcs-admin-skin .pcs-wrap .nbd-toggle-art-view.black {
    background: #000;
}

/* ---- Premium badge + global banner + global filter row ---- */
body.pcs-admin-skin .nbd-premium-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--pcs-radius-full, 999px);
    background: var(--pcs-warning-soft, #fdf3e7);
    color: var(--pcs-warning, #b26a00);
    vertical-align: middle;
}
body.pcs-admin-skin .nbd-global-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--pcs-text-soft, #50575e);
    background: var(--pcs-primary-soft, #eef0fc);
    border-radius: var(--pcs-radius-md, 10px);
}
body.pcs-admin-skin .nbd-global-banner .dashicons {
    color: var(--pcs-primary, #3b4fd8);
}
body.pcs-admin-skin .nbd-global-filter {
    display: inline-flex;
    gap: 8px;
    margin-left: 12px;
    vertical-align: middle;
}

/* ---- Skeleton loaders (used while grids refresh) ---- */
body.pcs-admin-skin .nbd-clipart-skeleton {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
body.pcs-admin-skin .nbd-clipart-skeleton span {
    width: 64px;
    height: 64px;
    border-radius: var(--pcs-radius-sm, 8px);
    background: linear-gradient(90deg, #eef0f2 25%, #e2e5e8 37%, #eef0f2 63%);
    background-size: 400% 100%;
    animation: nbd-skeleton 1.2s ease-in-out infinite;
}
@keyframes nbd-skeleton {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ============================================================
   Global Templates — larger artwork-first cards
   ============================================================ */
body.pcs-admin-skin #wpbody-content .nbd-global-templates-wrap.postbox {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}
body.pcs-admin-skin .nbd-global-template-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 12px;
    border: 1px solid var(--pcs-border-light, #dcdcde);
    border-radius: var(--pcs-radius-md, 10px);
    background: var(--pcs-bg, #fff);
    box-shadow: var(--pcs-shadow-sm, 0 1px 2px rgba(0,0,0,.05));
}
body.pcs-admin-skin .nbd-global-template-filter .button {
    border-radius: var(--pcs-radius-full, 999px);
}
body.pcs-admin-skin .nbd-global-template-grid.pcs-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
body.pcs-admin-skin .nbd-global-template-grid .nbdesigner-template-global {
    border: 1px solid var(--pcs-border-light, #dcdcde);
    border-radius: var(--pcs-radius-lg, 16px);
    background: var(--pcs-bg, #fff);
    cursor: pointer;
}
body.pcs-admin-skin .nbd-global-template-grid .nbdesigner-template-global:focus-visible {
    outline: none;
    border-color: var(--pcs-primary, #3b4fd8);
    box-shadow: 0 0 0 3px rgba(59, 79, 216, .18);
}
body.pcs-admin-skin .nbd-global-template-grid .nbdesigner-product-title {
    min-height: 50px;
    padding: 12px 14px 8px;
    font-size: 14px;
}
body.pcs-admin-skin .nbd-global-template-grid .nbdesigner-product-inner {
    padding: 0 14px;
}
body.pcs-admin-skin .nbd-global-template-grid:not(.is-list) .nbdesigner-product-inner .nbd-global-template-thumb,
body.pcs-admin-skin .nbd-global-template-grid .nbd-global-template-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    min-height: 220px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid var(--pcs-border-subtle, #f0f0f1);
    border-radius: var(--pcs-radius-md, 10px);
    background:
        linear-gradient(45deg, rgba(0,0,0,.035) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.035) 75%, rgba(0,0,0,.035)) 0 0 / 18px 18px,
        linear-gradient(45deg, rgba(0,0,0,.035) 25%, #fff 25%, #fff 75%, rgba(0,0,0,.035) 75%, rgba(0,0,0,.035)) 9px 9px / 18px 18px;
}
body.pcs-admin-skin .nbd-global-template-grid:not(.is-list) .nbdesigner-product-inner .nbd-global-template-thumb img,
body.pcs-admin-skin .nbd-global-template-grid .nbd-global-template-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    border: 0;
    border-radius: 0;
    background: transparent;
}
body.pcs-admin-skin .nbd-global-template-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px 14px;
    color: var(--pcs-text-soft, #50575e);
    font-size: 12px;
}
body.pcs-admin-skin .nbd-global-template-id {
    font-weight: 600;
    color: var(--pcs-text-mute, #8c8f94);
}
body.pcs-admin-skin .nbd-global-template-use {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: var(--pcs-radius-full, 999px);
    background: var(--pcs-primary-soft, #eef0fc);
    color: var(--pcs-primary, #3b4fd8);
    font-weight: 700;
}
body.pcs-admin-skin .nbd-global-template-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 44px 18px;
    border: 1px dashed var(--pcs-border, #c3c4c7);
    border-radius: var(--pcs-radius-lg, 16px);
    background: var(--pcs-bg, #fff);
    color: var(--pcs-text-soft, #50575e);
    text-align: center;
}
body.pcs-admin-skin .nbd-global-template-empty .dashicons {
    width: 42px;
    height: 42px;
    font-size: 42px;
    color: var(--pcs-border, #c3c4c7);
}
body.pcs-admin-skin .nbd-global-template-empty p {
    margin: 0;
    font-weight: 600;
}
body.pcs-admin-skin .nbd-global-templates-wrap .tablenav-pages {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
body.pcs-admin-skin .nbd-global-templates-wrap .displaying-num {
    color: var(--pcs-text-soft, #50575e);
    font-weight: 600;
}

/* Assign-template modal */
body.pcs-admin-skin #nbd-assign-product-modal {
    background: rgba(17, 24, 39, .48);
    padding: 24px;
}
body.pcs-admin-skin #nbd-assign-product-modal .nbd-modal-inner {
    width: min(560px, 100%);
    max-height: min(78vh, 720px);
    padding: 0;
    gap: 0;
    border: 1px solid var(--pcs-border-light, #dcdcde);
    border-radius: var(--pcs-radius-lg, 16px);
    box-shadow: var(--pcs-shadow-lg, 0 8px 24px rgba(0,0,0,.16));
    overflow: hidden;
}
body.pcs-admin-skin #nbd-assign-product-modal .nbd-modal-header,
body.pcs-admin-skin #nbd-assign-product-modal .nbd-modal-footer {
    padding: 14px 16px;
    background: var(--pcs-bg-soft, #f6f7f7);
}
body.pcs-admin-skin #nbd-assign-product-modal .nbd-modal-header {
    border-bottom: 1px solid var(--pcs-border-light, #dcdcde);
}
body.pcs-admin-skin #nbd-assign-product-modal .nbd-modal-footer {
    border-top: 1px solid var(--pcs-border-light, #dcdcde);
}
body.pcs-admin-skin #nbd-assign-product-modal .nbd-modal-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--pcs-radius-sm, 8px);
    color: var(--pcs-text-soft, #50575e);
}
body.pcs-admin-skin #nbd-assign-product-modal .nbd-modal-close-btn:hover,
body.pcs-admin-skin #nbd-assign-product-modal .nbd-modal-close-btn:focus-visible {
    background: var(--pcs-bg, #fff);
    color: var(--pcs-text, #1d2327);
    outline: none;
}
body.pcs-admin-skin #nbd-product-search {
    width: auto;
    margin: 16px 16px 12px;
}
body.pcs-admin-skin #nbd-product-results {
    min-height: 220px;
    margin: 0 16px 16px;
    border-color: var(--pcs-border-light, #dcdcde);
    border-radius: var(--pcs-radius-md, 10px);
    background: var(--pcs-bg, #fff);
}
body.pcs-admin-skin #nbd-product-results p {
    padding: 16px;
    color: var(--pcs-text-soft, #50575e);
}
body.pcs-admin-skin #nbd-product-results li {
    min-height: 54px;
    padding: 9px 12px;
    border-bottom-color: var(--pcs-border-subtle, #f0f0f1);
    transition: background .12s, color .12s;
}
body.pcs-admin-skin #nbd-product-results li:hover {
    background: var(--pcs-primary-soft, #eef0fc);
    color: var(--pcs-primary, #3b4fd8);
}
body.pcs-admin-skin #nbd-product-results li img {
    width: 42px;
    height: 42px;
    border-radius: var(--pcs-radius-sm, 8px);
}
@media (max-width: 782px) {
    body.pcs-admin-skin .nbd-global-template-grid.pcs-product-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    body.pcs-admin-skin .nbd-global-template-grid:not(.is-list) .nbdesigner-product-inner .nbd-global-template-thumb,
    body.pcs-admin-skin .nbd-global-template-grid .nbd-global-template-thumb {
        min-height: 190px;
    }
    body.pcs-admin-skin #nbd-assign-product-modal {
        padding: 12px;
    }
}
