/* ── WPBean PGS — Variation Gallery Admin ──────────────────────────────────── */

.wcpg-var-gallery-wrap {
    margin: 1em 0;
}

/* ── Card shell ──────────────────────────────────────────────────────────────── */

.wcpg-vg-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* ── Card header ─────────────────────────────────────────────────────────────── */

.wcpg-vg-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.wcpg-vg-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #eff6ff;
    color: #2271b1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wcpg-vg-card-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.wcpg-vg-card-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.wcpg-vg-card-title strong {
    font-size: 11.5px;
    color: #1f2937;
    line-height: 1.3;
    font-weight: 600;
}

.wcpg-vg-card-title span {
    font-size: 10.5px;
    color: #9ca3af;
    line-height: 1.3;
}

/* Header icon buttons */
.wcpg-vg-card-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

/* ── Card body ───────────────────────────────────────────────────────────────── */

.wcpg-vg-card-body {
    padding: 10px;
}

/* ── Thumbnail grid ──────────────────────────────────────────────────────────── */

.wcpg-vg-images {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
    min-height: 1px;
}

.wcpg-vg-item {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    background: #f3f4f6;
    cursor: grab;
    flex-shrink: 0;
    transition:
        border-color 0.12s,
        box-shadow 0.12s;
}

.wcpg-vg-item:hover {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15);
}

.wcpg-vg-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Per-item remove button — small badge in the top-right corner so the
   rest of the thumbnail remains a valid drag surface for jQuery UI Sortable. */
.wcpg-vg-item-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition:
        opacity 0.15s,
        background 0.15s;
    box-shadow: none;
    z-index: 1;
}

.wcpg-vg-item:hover .wcpg-vg-item-remove {
    opacity: 1;
}

.wcpg-vg-item-remove:hover {
    background: rgba(220, 38, 38, 0.85);
}

.wcpg-vg-item-remove svg {
    width: 11px;
    height: 11px;
    pointer-events: none;
    flex-shrink: 0;
}

/* Sortable placeholder */
.wcpg-vg-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    border: 2px dashed #2271b1;
    background: #eff6ff;
    flex-shrink: 0;
}

/* Dragging helper */
.wcpg-vg-item.ui-sortable-helper {
    opacity: 0.7;
    cursor: grabbing;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

/* ── Add Images button — dashed, full-width ──────────────────────────────────── */

.wcpg-vg-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 32px;
    background: #fff;
    border: 1.5px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition:
        border-color 0.15s,
        color 0.15s,
        background 0.15s;
    font-family: inherit;
    box-shadow: none;
    margin: 0;
}

.wcpg-vg-add-btn:hover,
.wcpg-vg-add-btn:focus {
    border-color: #2271b1;
    color: #2271b1;
    background: #eff6ff;
    outline: none;
    box-shadow: none;
}

.wcpg-vg-add-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke: currentColor;
}

/* ── Utility: hidden ─────────────────────────────────────────────────────────── */

.wcpg-vg-hidden {
    display: none !important;
}

/* ── Pro upgrade notice (compact inline bar) ─────────────────────────────────── */

.wcpg-vg-upgrade-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #faf5ff;
    border-top: 1px solid #ede9fe;
    flex-wrap: wrap;
}

.wcpg-vg-upgrade-bar-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #7c3aed;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 2px 6px 2px 5px;
    border-radius: 4px;
    line-height: 1.6;
    flex-shrink: 0;
    white-space: nowrap;
}

.wcpg-vg-upgrade-bar-badge svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.wcpg-vg-upgrade-bar-msg {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.wcpg-vg-upgrade-bar-btn {
    display: inline-block;
    padding: 3px 10px;
    background: #7c3aed;
    color: #fff !important;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none !important;
    transition: background 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.wcpg-vg-upgrade-bar-btn:hover,
.wcpg-vg-upgrade-bar-btn:focus {
    background: #6d28d9 !important;
    color: #fff !important;
    outline: none;
}
