.esfw-admin-wrap {
  margin: 20px 20px 0 0;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  box-sizing: border-box;
}

.esfw-admin-wrap *,
.esfw-admin-wrap *::before,
.esfw-admin-wrap *::after {
  box-sizing: border-box;
}

.heading-three {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.esfw-header {
  background: #fff;
  padding: 25px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 20px;
}

.esfw-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.esfw-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
}

.esfw-header .heading-one {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.esfw-header p {
  margin: 6px 0 0;
  color: #6b7280;
}

.esfw-layout {
  display: flex;
  gap: 20px;
}

.esfw-sidebar {
  width: 250px;
}

.esfw-sidebar-menu {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  white-space: nowrap;
}

.esfw-menu-item,
.esfw-submenu {
  padding: 14px 16px;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.esfw-menu-item:hover,
.esfw-submenu:hover {
  background: #f9fafb;
}

.esfw-submenu.active,
.esfw-menu-item.active {
  background: #f9f5fd;
  color: #7c3aed;
  font-weight: 600;
}

.esfw-main-content {
  flex: 1;
  min-width: 0;
}

.esfw-feature-card {
  display: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.esfw-feature-card.active {
  display: block;
}

.esfw-feature-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px;
  border-bottom: 1px solid #f3f4f6;
}

.esfw-feature-head {
  width: auto;
}

.esfw-feature-right-toggle {
  width: 40px;
  padding: 10px;
}


.esfw-feature-header .heading-two {
  margin: 0;
  font-size: 24px;
  white-space: nowrap;
}

.esfw-feature-header p {
  margin: 8px 0 0;
  color: #6b7280;
}

.esfw-tabs {
  display: flex;
  gap: 25px;
  padding: 0 25px;
  white-space: nowrap;
  border-bottom: 1px solid #f3f4f6;
}

.esfw-tab {
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: #6b7280;
}

.esfw-tab.active {
  color: #7c3aed;
  border-bottom: 2px solid #7c3aed;
}

.esfw-settings-box {
  padding: 25px;

}

.esfw-setting-toggle {
  display: flex;
  justify-content: space-between;
  background-color: #f9f5fd;
  border-radius: 10px;
  padding: 10px;

}

.esfw-setting-toggle:hover {
  background-color: #f2ecf8;
}

/* Master Toggles */
.esfw-master-toggle {
  border-left: 4px solid #8b5cf6;
  background: #fcfaff;
  border-radius: 8px;
  margin-bottom: 18px;
}

.esfw-master-toggle .esfw-setting-toggle {
  padding: 16px 18px;
}

.esfw-setting-row {
  margin-bottom: 15px;
}

.esfw-setting-row label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
}

.esfw-setting-row input[type="text"] {
  width: 100%;
  max-width: 350px;
  border-radius: 10px;
}

.esfw-setting-row select {
  width: 100%;
  max-width: 350px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;

}

.esfw-setting-row label {
  display: flex;
  align-items: center;

  font-size: 13px;
  color: #374151;
}

.esfw-color-row {
  display: flex;
  grid-template-columns: repeat(2, minmax(180px, 240px));
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.esfw-setting-row input[type="color"].esfw-color-input {
  width: 100%;
  max-width: 100px;

  border: 1px solid #d1d5db;
  box-shadow: inset 0 0 0 1px #fff;
}

#esfw-color-pair-row {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 30px;
}

#esfw-color-pair-row>.esfw-setting-row,
#esfw-color-pair-row>.esfw-lf-field {
  flex: 1;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}


#esfw-color-pair-row>.esfw-setting-row>label,
#esfw-color-pair-row>.esfw-lf-field>label:first-child {
  margin-bottom: 10px;
  text-align: center;
}


#esfw-color-pair-row .esfw-color-field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}


#esfw-color-pair-row #esfw-badge-shadow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#esfw-color-pair-row {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 30px;
}

#esfw-color-pair-row>.esfw-setting-row,
#esfw-color-pair-row>.esfw-lf-field {
  flex: 1;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#esfw-color-pair-row>.esfw-setting-row>label,
#esfw-color-pair-row>.esfw-lf-field>label:first-child {
  margin-bottom: 10px;
  text-align: center;
}

/* Color picker + hex */
#esfw-color-pair-row .esfw-color-field {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Shadow toggle */
#esfw-color-pair-row #esfw-badge-shadow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.esfw-badge-image-settings,
.esfw-badge-schedule-fields {
  display: none;
}

.esfw-actions {
  padding: 15px;
  padding-left: 25px;
  border-top: 1px solid #f3f4f6;
}

.esfw-save-wrap {
  display: none;
}

.esfw-save-wrap.active {
  display: block;
}

.esfw-right-sidebar {
  width: 250px;
}

.esfw-side-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.esfw-side-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.esfw-side-card .heading-three {
  margin: 0;
  line-height: 1.2;
}

.esfw-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.esfw-status {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
}

.esfw-status.enabled {
  background: #dcfce7;
  color: #15803d;
}

.esfw-status.disabled {
  background: #fee2e2;
  color: #dc2626;
}

/* Toggle Switch */
.esfw-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.esfw-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.esfw-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 22px;
  transition: 0.3s ease;
}

.esfw-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s ease;
}

.esfw-switch input:checked+.esfw-slider {
  background: #7c3aed;
}

.esfw-switch input:checked+.esfw-slider:before {
  transform: translateX(20px);
}

.esfw-tab-content {
  display: none;
}

.esfw-tab-content.active {
  display: block;
}

.esfw-display-card {
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 20px;
}



.esfw-display-card p {
  color: #6b7280;
  font-size: 13px;
}

.esfw-display-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.esfw-display-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.esfw-display-item:last-child {
  border-bottom: none;
}

.esfw-display-item label:first-child {
  margin: 0;
  font-weight: 500;
}

.esfw-badges-privew-sidebar {
  display: none;
}

/*Tooltip CSS*/
.esfw-admin-wrap .tooltip {
  position: relative;
  cursor: pointer;
  text-align: start;
}

.esfw-admin-wrap .tooltip:after,
.esfw-admin-wrap .tooltip:before {
  opacity: 0;
  pointer-events: none;
  bottom: 100%;
  left: 50%;
  position: absolute;
  z-index: 10;
  transform: translate(-50%, 10px);
  transform-origin: top;
  transition: all 0.18s ease-out 0.18s;
}

.esfw-admin-wrap .tooltip:after {
  background-color: #fff;
  border: 1px solid #cfd8e2;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  content: attr(data-tooltip);
  padding: 20px;
  color: #666e81;
  border-radius: 5px;
  white-space: nowrap;
  margin-bottom: 11px;
}

.esfw-admin-wrap .help-icon {
  color: #727272;
  font-size: 13px;
  text-align: start;

}

.esfw-admin-wrap .tooltip:before {
  width: 0;
  height: 0;
  content: "";
  margin-bottom: 6px;
}

.esfw-admin-wrap .tooltip:hover:before,
.esfw-admin-wrap .tooltip:hover:after {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.esfw-admin-wrap [data-tooltip-pos="up"]:before {
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #607dbc;
  margin-bottom: 4px;
}

.esfw-admin-wrap [data-tooltip-pos="down"]:before {
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #607dbc;
  margin-left: 1px;
  margin-top: 3px;
}

.esfw-admin-wrap [data-tooltip-pos="right"]:before {
  border-top: 8px solid transparent;
  border-right: 8px solid #607dbc;
  border-bottom: 8px solid transparent;
  margin-left: 5px;
}

.esfw-admin-wrap [data-tooltip-pos="left"]:before {
  border-top: 8px solid transparent;
  border-left: 8px solid #607dbc;
  border-bottom: 8px solid transparent;
  margin-right: 3px;
}

.esfw-admin-wrap [data-tooltip-pos="down"]:before,
.esfw-admin-wrap [data-tooltip-pos="down"]:after {
  bottom: auto;
  left: 50%;
  top: 100%;
  transform: translate(-50%, -10px);
}

.esfw-admin-wrap [data-tooltip-pos="down"]:after {
  margin-top: 11px;
}

.esfw-admin-wrap [data-tooltip-pos="down"]:hover:before,
.esfw-admin-wrap [data-tooltip-pos="down"]:hover:after {
  transform: translate(-50%, 0);
}

.esfw-admin-wrap [data-tooltip-pos="left"]:before,
.esfw-admin-wrap [data-tooltip-pos="left"]:after {
  bottom: auto;
  left: auto;
  right: 100%;
  top: 50%;
  transform: translate(10px, -50%);
}

.esfw-admin-wrap [data-tooltip-pos="left"]:after {
  margin-right: 11px;
}

.esfw-admin-wrap [data-tooltip-pos="left"]:hover:before,
.esfw-admin-wrap [data-tooltip-pos="left"]:hover:after {
  transform: translate(0, -50%);
}

.esfw-admin-wrap [data-tooltip-pos="right"]:before,
.esfw-admin-wrap [data-tooltip-pos="right"]:after {
  bottom: auto;
  left: 100%;
  top: 50%;
  transform: translate(-10px, -50%);
}

.esfw-admin-wrap [data-tooltip-pos="right"]:after {
  margin-left: 11px;
}

.esfw-admin-wrap [data-tooltip-pos="right"]:hover:before,
.esfw-admin-wrap [data-tooltip-pos="right"]:hover:after {
  transform: translate(0, -50%);
}

.esfw-admin-wrap [data-tooltip-length]:after {
  white-space: normal;
}

.esfw-admin-wrap [data-tooltip-length="small"]:after {
  width: 150px;
}

.esfw-admin-wrap [data-tooltip-length="medium"]:after {
  width: 250px;
  word-break: break-word;
}

.esfw-admin-wrap [data-tooltip-length="large"]:after {
  width: 350px;
}

.esfw-admin-wrap [data-tooltip-length="fit"]:after {
  width: 450px;
}

.esfw-admin-wrap .manual-margin {
  margin-top: 10px !important;
}

/*Tooltip CSS*/

/* Barcode preview (product and variation edit pages) */
.esfw-barcode-preview-field {
  display: block !important;
  margin: 15px 0 !important;
  clear: both;
}

.esfw-barcode-preview-field .esfw-barcode-preview-label {
  display: block;
  width: auto;
  padding: 0 !important;
}

.esfw-barcode-preview-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.esfw-barcode-preview-image-wrap {
  display: block;
}

.esfw-barcode-preview-image {
  display: block;
  max-width: 260px;
}

.esfw-barcode-preview-image .esfw-barcode {
  width: auto;
  height: auto;

}

.esfw-barcode-print-link {
  white-space: nowrap;
}

.column-wc_actions a.esfw-duplicate::after {
  font-family: dashicons;
  content: "\f105";
}

/* Barcode Print Page-*/

body.esfw-print-page {
  font-family: Arial, sans-serif;
  margin: 20px;
  color: #111;
}

.esfw-print-bar {
  margin-bottom: 20px;
}

.esfw-print-bar button {
  font-size: 14px;
  padding: 8px 16px;
  cursor: pointer;
}

.esfw-labels {
  display: flex;

  flex-wrap: wrap;
  gap: 12px;
}

.esfw-label {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 12px;
  width: 220px;
  box-sizing: border-box;
  text-align: center;
  page-break-inside: avoid;
}

.esfw-label .esfw-barcode {
  max-width: 100%;
  height: auto;
}

.esfw-barcode {
  overflow: visible;
}

.esfw-label-name {
  margin-bottom: 8px;
  font-size: 12px;
  word-break: break-word;
}

@media print {
  .esfw-print-bar {
    display: none;
  }

  .esfw-label {
    border: 1px dashed #999;
  }
}

/* Product Code admin column */
.column-product_code {
  width: 140px !important;
  white-space: nowrap;
}

/* Product Badge: live preview + presets (Badge Appearance tab) */
.esfw-badge-preview-stage {
  position: relative;
  width: 220px;
  height: 180px;
  border-radius: 10px;
  background: repeating-conic-gradient(#f3f4f6 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
  border: 1px solid #ced0d1;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-self: center;
}

.esfw-badge-preview-image-mode {
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

.esfw-badge-preview-img {
  display: block;
  width: 100px;
  height: auto;
  max-height: 120px;
  object-fit: contain;
}

/* Shared badge-design renderer used by the admin Live Preview */
#esfw-badge-preview-badge .esfw-product-badge-design {
  line-height: 0;
  max-width: 100%;
}

#esfw-badge-preview-badge .esfw-product-badge-design-text {
  font-size: var(--esfw-badge-font-size, 13px);
}

.esfw-badge-design-gallery {
  max-width: 100%;
}

.esfw-badge-design-gallery .esfw-product-badge-design-text {
  font-size: 11px;
  font-weight: 600;
}


/* Product Badge: Badge Type / Image Source radio choices */
/* Premium skin: Badge Appearance tab */
#badge-appearance {
  --esfw-p-accent: #7c3aed;
  --esfw-p-accent-end: #4C1D95;
  --esfw-p-soft: #F5F3FF;
  --esfw-p-border: #E5E7EB;
  --esfw-p-border-hover: #C4B5FD;
  --esfw-p-ink: #111827;
  --esfw-p-muted: #6B7280;
  --esfw-p-radius: 14px;
}

#badge-appearance .esfw-display-card {
  border-radius: var(--esfw-p-radius);
  border: 1px solid var(--esfw-p-border);
  padding: 15px 20px;
  transition: box-shadow .2s ease, border-color .2s ease;
}


#badge-appearance .heading-three {
  font-size: 16px;
  letter-spacing: -.01em;
  color: var(--esfw-p-ink);
  position: relative;
}

#badge-appearance .esfw-display-card>p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--esfw-p-muted);
}

/* Info banner shown near Custom Image / Badge Content Type settings while
   they're disabled because Automatic Badge is on. */
.esfw-locked-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--esfw-p-soft, #F5F3FF);
  border: 1px solid #E9D8FD;
  color: #7c3aed;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}

.esfw-locked-notice .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

#badge-appearance .heading-four {
  color: var(--esfw-p-accent);
  letter-spacing: .06em;
}

/*  Text / Image radio cards  */
#badge-appearance .esfw-radio-row {
  gap: 16px;
}

#badge-appearance .esfw-radio-option {
  flex: 1 1 220px;
  padding: 0;
  align-items: stretch;
  position: relative;
}

#badge-appearance .esfw-radio-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

#badge-appearance .esfw-radio-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--esfw-p-border);
  border-radius: 12px;
  background: #fff;
  position: relative;
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}


#badge-appearance .esfw-radio-option:hover .esfw-radio-card {
  border-color: var(--esfw-p-border-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px rgba(190, 161, 233, 0.25);
}

#badge-appearance .esfw-radio-input:checked+.esfw-radio-card {
  border-color: var(--esfw-p-accent);
  background: var(--esfw-p-soft);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, .12), 0 10px 24px -10px #f2ecf8;
}

#badge-appearance .esfw-radio-input:checked+.esfw-radio-card::before {
  opacity: 1;
}

#badge-appearance .esfw-radio-input:focus-visible+.esfw-radio-card {
  outline: 2px solid var(--esfw-p-accent);
  outline-offset: 2px;
}

#badge-appearance .esfw-radio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--esfw-p-soft);
  color: var(--esfw-p-accent);
  font-size: 18px;
  flex-shrink: 0;
  transition: background .18s ease, color .18s ease;
}

#badge-appearance .esfw-radio-input:checked+.esfw-radio-card .esfw-radio-icon {
  background: linear-gradient(135deg, var(--esfw-p-accent), var(--esfw-p-accent-end));
  color: #fff;
}

#badge-appearance .esfw-radio-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

#badge-appearance .esfw-radio-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--esfw-p-ink);
}

#badge-appearance .esfw-radio-card-desc {
  font-size: 12px;
  color: var(--esfw-p-muted);
  font-weight: 400;
}

#badge-appearance .esfw-radio-check {
  color: var(--esfw-p-accent);
  font-size: 20px;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .18s ease, transform .18s ease;
}

#badge-appearance .esfw-radio-input:checked+.esfw-radio-card .esfw-radio-check {
  opacity: 1;
  transform: scale(1);
}

/*  Text style block (Badge Text + Colors)  */
#badge-appearance .esfw-badge-text-setting {
  padding-top: 4px;
}

#badge-appearance .esfw-color-field {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--esfw-p-border);
  border-radius: 10px;
  padding: 6px 10px;
  background: #fff;
  width: fit-content;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#badge-appearance .esfw-color-field:hover {
  border-color: var(--esfw-p-border-hover);
}

#badge-appearance .esfw-color-field:focus-within {
  border-color: var(--esfw-p-accent);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, .12);
}

#badge-appearance .esfw-color-field .esfw-color-input {
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: none;
}

#badge-appearance .esfw-color-hex {
  font-size: 12px;
  font-weight: 600;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--esfw-p-muted);
  text-transform: uppercase;
}

/*  Custom Image upload dropzone  */
#badge-appearance .esfw-badge-custom-upload-card {
  max-width: 100%;
  border: 1.5px dashed var(--esfw-p-border-hover);
  border-radius: var(--esfw-p-radius);
  background: linear-gradient(180deg, #FAFAFF, #F5F3FF);
  text-align: center;
  transition: border-color .18s ease, background .18s ease;
}

#badge-appearance .esfw-badge-custom-upload-card:hover {
  border-color: var(--esfw-p-accent);
}

#badge-appearance .esfw-badge-custom-preview {
  margin: 0 auto 18px;
  border-radius: 14px;
  border: 2px dashed var(--esfw-p-border-hover);
  background: repeating-conic-gradient(#F5F3FF 0% 25%, #ffffff 0% 50%) 50% / 18px 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}

#badge-appearance .esfw-badge-custom-preview.esfw-is-empty::before {
  color: var(--esfw-p-accent);
}

#badge-appearance .esfw-upload-actions {
  justify-content: center;
}

#badge-appearance .esfw-badge-custom-upload-card .button {
  border-radius: 8px;
  border: 1px solid var(--esfw-p-border);
  background: #fff;
  font-weight: 600;
  font-size: 12px;
  padding: 6px 14px;
  transition: all .18s ease;
}

#badge-appearance #esfw-badge-upload-btn,
#badge-appearance #esfw-badge-replace-btn {
  background: linear-gradient(135deg, var(--esfw-p-accent), var(--esfw-p-accent-end));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(76, 29, 149, .5);
}

#badge-appearance #esfw-badge-upload-btn:hover,
#badge-appearance #esfw-badge-replace-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px -8px rgba(76, 29, 149, .55);
}

#badge-appearance #esfw-badge-remove-btn {
  color: #dc2626;
  border-color: #fecaca;
}

#badge-appearance #esfw-badge-remove-btn:hover {
  background: #fef2f2;
}

/*  Image Badge: Icon Library / Custom Upload sub-tabs  */
/* Badge Content Sub-tabs */
#badge-appearance .esfw-subtabs {
  display: flex;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 4px;
  background: var(--esfw-p-soft);
  border-radius: 10px;
  width: fit-content;
}

#badge-appearance .esfw-subtab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--esfw-p-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

#badge-appearance .esfw-subtab .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

#badge-appearance .esfw-subtab:hover {
  color: var(--esfw-p-ink);
}

#badge-appearance .esfw-subtab.active {
  background: #fff;
  color: var(--esfw-p-accent);
  box-shadow: 0 2px 8px -3px rgba(76, 29, 149, .35);
}


/* Sub-tab Panels */
#badge-appearance .esfw-subtab-panel {
  display: none;
}

#badge-appearance .esfw-subtab-panel.active {
  display: block;
}


.esfw-custom-badge-design-field {
  display: block;
  margin: 8px 0 0;
}

.esfw-custom-badge-design-field>label {
  display: block;
  float: none;
  width: auto;
  margin: 0 0 4px;
  font-weight: 600;
}

/* Badge Designs */
.badge-style-wrapper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

/* Custom Badge Design Grid  */

.esfw-custom-badge-design-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 12px;
  width: 100%;
  margin-top: 12px;
  align-items: stretch;
}


/*  Custom Badge Design Car */

.esfw-custom-badge-design-grid .esfw-custom-badge-design-option {
  position: relative;
  box-sizing: border-box;

  width: 100%;
  min-width: 0;
  height: 100px;

  margin: 0 !important;
  padding: 10px !important;

  display: flex !important;
  align-items: center;
  justify-content: center;

  border: 1px solid #dcdcde;
  border-radius: 10px;

  background: #fff;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}


/* Hover */

.esfw-custom-badge-design-grid .esfw-custom-badge-design-option:hover {
  border-color: #8c8f94;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* Hide Radio */

.esfw-custom-badge-design-grid .esfw-custom-badge-design-option>input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* SVG Preview Container  */

.esfw-custom-badge-design-grid .esfw-badge-design-preview {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  line-height: 0;
}


/*  SVG */

.esfw-custom-badge-design-grid .esfw-badge-design-preview>svg {
  display: block;

  width: 90px;
  height: 70px;

  max-width: 100%;
  max-height: 100%;

  flex: 0 0 auto;

  /* Preserve SVG's own colors */
  color: initial;


}


/* =========================================
   Never override SVG internal colors
   ========================================= */
#badge-appearance .badge-style,
.esfw-custom-badge-design-field .badge-style {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid var(--esfw-p-border, #e5e7eb);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

#badge-appearance .badge-style:hover,
.esfw-custom-badge-design-field .badge-style:hover {
  transform: translateY(-1px);
}

.esfw-custom-badge-design-field .badge-style {
  min-height: 82px;
  padding: 10px;
  overflow: visible;
}

#badge-appearance .badge-style svg,
.esfw-custom-badge-design-field .badge-style svg {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 56px;
  flex: 0 0 auto;
  object-fit: contain;
}

#badge-appearance .badge-style .esfw-badge-design-preview,
.esfw-custom-badge-design-field .badge-style .esfw-badge-design-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  width: 100%;
  height: 56px;
  min-height: 56px;
  line-height: 0;
}

#badge-appearance .badge-style .esfw-badge-design-preview svg,
.esfw-custom-badge-design-field .badge-style .esfw-badge-design-preview svg {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 56px;
  overflow: visible;
  flex: 0 0 auto;
}

#badge-appearance .badge-style .esfw-design-svg-text,
.esfw-custom-badge-design-field .badge-style .esfw-design-svg-text {
  display: block;
  visibility: visible;
  opacity: 1;
  pointer-events: none;
  overflow: visible;
}

#badge-appearance .badge-style .esfw-design-svg-tspan,
.esfw-custom-badge-design-field .badge-style .esfw-design-svg-tspan {
  text-anchor: middle;
}


/*
 * Main Badge Designs gallery live text.
 * The SVG remains the source for the badge artwork; this overlay guarantees
 * the text entered in Badge Text is visible on every design, including SVGs
 * that contain masks/patterns.
 */
#badge-appearance .badge-style .esfw-badge-design-preview {
  position: relative;
}

#badge-appearance .badge-style .esfw-badge-design-live-text {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 76%;
  max-width: 76%;
  min-width: 0;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  font-family: Poppins, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.08;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  pointer-events: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}

#badge-appearance .badge-style .esfw-badge-design-preview > svg .esfw-design-svg-text {
  visibility: hidden;
}

/*
 * Product Edit > Custom Badge: render the live custom text as an HTML
 * overlay. The SVG still supplies the exact badge shape, while this layer
 * guarantees that the text is visible and updates immediately as the admin
 * types. The SVG's internal text is hidden only in this product-edit grid so
 * it cannot duplicate the overlay.
 */
.esfw-custom-badge-design-field .esfw-badge-design-preview {
  position: relative;
}

.esfw-custom-badge-design-field .esfw-badge-design-preview>svg .esfw-design-svg-text {
  visibility: hidden;
}

.esfw-custom-badge-design-field .esfw-custom-badge-design-text {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 76%;
  max-width: 76%;
  min-width: 0;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  pointer-events: none;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .12);
}

.esfw-custom-badge-design-field .esfw-badge-design-03 .esfw-custom-badge-design-text,
.esfw-custom-badge-design-field .esfw-badge-design-04 .esfw-custom-badge-design-text,
.esfw-custom-badge-design-field .esfw-badge-design-05 .esfw-custom-badge-design-text,
.esfw-custom-badge-design-field .esfw-badge-design-06 .esfw-custom-badge-design-text,
.esfw-custom-badge-design-field .esfw-badge-design-07 .esfw-custom-badge-design-text {
  width: 68%;
  max-width: 68%;
}


.esfw-design-svg {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 100%;

  object-fit: contain;
}

#badge-appearance .badge-style input[type="radio"],
.esfw-custom-badge-design-field .badge-style input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

#badge-appearance .badge-style img,
.esfw-custom-badge-design-field .badge-style img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#badge-appearance .badge-style:hover,
.esfw-custom-badge-design-field .badge-style:hover {
  border-color: var(--esfw-p-border-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px rgba(190, 161, 233, .25);
}

#badge-appearance .badge-style:has(input[type="radio"]:checked),
.esfw-custom-badge-design-field .badge-style:has(input[type="radio"]:checked) {
  border-color: var(--esfw-p-accent);
  background: var(--esfw-p-soft);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, .12);
}

/* Custom Badge Designs */
.esfw-product-badge[class*="esfw-badge-design-"] {
  background-color: transparent;
  background-image: none;
  border-radius: 0;
  min-width: 0;
  min-height: 0;
  padding: 0;

  width: 110px;
  height: 60px;

  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  color: #ffffff;

  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Badge Text Fields: text + both colors sit in a single compact row */
#badge-appearance .esfw-text-style-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-top: 14px;
}

#badge-appearance .esfw-ts-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#badge-appearance .esfw-ts-field label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--esfw-p-muted);
}

#badge-appearance .esfw-ts-text {
  flex: 1 1 220px;
}

#badge-appearance .esfw-ts-text input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--esfw-p-border);
  font-weight: 500;
  font-size: 13px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#badge-appearance .esfw-ts-text input[type="text"]:focus {
  border-color: var(--esfw-p-accent);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, .12);
  outline: none;
}

#badge-appearance .esfw-ts-color {
  flex: 0 0 auto;
}

.esfw-badges-apply {
  width: 100%;
  max-width: 350px;
  margin-bottom: 10px;
}

.badge-content-text {
  padding: 8px 10px;
  border: 1.5px solid var(--esfw-p-border) !important;
}

/* --- Look & Feel: Apply, Size, Position, Animation, Shadow --- */
#badge-appearance .esfw-lf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 16px;
}

#badge-appearance .esfw-lf-field {
  display: block;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#badge-appearance .esfw-lf-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--esfw-p-ink);
  flex-shrink: 0;
}

#badge-appearance .esfw-lf-field select {
  flex: 1 1 auto;
  min-width: 100%;
  border-radius: 8px;
  border: 1.5px solid var(--esfw-p-border);
  font-weight: 500;
  font-size: 13px;

  transition: border-color .15s ease, box-shadow .15s ease;
}

#badge-appearance .esfw-lf-field-toggle {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  border: 1.5px solid var(--esfw-p-border);
  padding: 10px
}

#badge-appearance .esfw-lf-field.esfw-disabled {
  border-style: dashed;
}

@media (max-width: 782px) {
  #badge-appearance .esfw-lf-grid {
    grid-template-columns: 1fr;
  }
}

.esfw-radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 12px;
}

.esfw-radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-weight: 500;
  cursor: pointer;
}

.esfw-display-card>.esfw-badge-subsection:first-child {
  margin-top: 0;
}

.esfw-badge-divider {
  border: none;
  border-top: 1px solid #eef0f2;
  margin: 15px 0;
}

.heading-four {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
}

.esfw-badge-image-gallery,
.esfw-badge-custom-upload-card,
.esfw-badge-image-settings>.esfw-setting-row {
  margin: 26px 0;
}

#esfw-badge-image-settings>*:last-child {
  margin-bottom: 0;
}



.esfw-badge-image-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  max-width: 100px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  padding: 8px;
  box-sizing: border-box;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.esfw-badge-image-card:hover {
  border-color: #c4b5fd;
}

.esfw-badge-image-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.esfw-badge-image-card-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
}

.esfw-badge-image-card-thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 44px;
  max-height: 44px;
}

.esfw-badge-image-card-label {
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.esfw-badge-image-card-check {
  display: none;
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 1;
  color: #7c3aed;
}

.esfw-badge-image-card.selected {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.esfw-badge-image-card.selected .esfw-badge-image-card-check {
  display: block;
}

.esfw-badge-custom-upload-card {
  max-width: 460px;
  padding: 20px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
}

.esfw-badge-custom-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border: 2px dashed #d1d5db;
  border-radius: 10px;
  background: repeating-conic-gradient(#f3f4f6 0% 25%, #ffffff 0% 50%) 50% / 16px 16px;
  margin-bottom: 16px;
}

.esfw-badge-custom-preview img {
  max-width: 100%;
  max-height: 100%;
}

.esfw-badge-custom-preview.esfw-is-empty::before {
  content: "\f128";
  font-family: dashicons;
  font-size: 28px;
  color: #9ca3af;
}

.esfw-upload-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.esfw-badge-custom-upload-card .description {
  margin: 0;
  line-height: 1.6;
}

.esfw-upload-error {
  margin-top: 10px;
  color: #dc2626;
  font-weight: 600;
}

/************************* Product Badge: Scheduling tab */
.esfw-badge-schedule-fields input[type="datetime-local"] {
  max-width: 260px;
}

.esfw-badge-schedule-time {
  display: flex;
  justify-content: space-evenly;
  justify-content: center;
  gap: 30px;
}

.esfw-badge-schedule-status {
  display: inline-block;
  align-items: end;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  background: #f3f4f6;
}

.esfw-badge-schedule-status-active {
  background: #dcfce7;
  color: #15803d;
}

.esfw-badge-schedule-status-scheduled {
  background: #fef9c3;
  color: #a16207;
}

.esfw-badge-schedule-status-expired {
  background: #fee2e2;
  color: #b91c1c;
}

/* Product Barcode Generator: Barcode Type card gallery (General Settings tab) */
.esfw-barcode-type-gallery {
  /* padding: 10px; */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;

}

@media (max-width: 900px) {
  .esfw-barcode-type-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width:1024px) {
  .esfw-barcode-type-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

}

.esfw-barcode-type-card {
  width: 170px;
  height: 150px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  box-sizing: border-box;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.esfw-barcode-type-card:hover {
  border-color: #c4b5fd;
}

.esfw-barcode-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.esfw-barcode-type-card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100px;
  overflow: hidden;
}

.esfw-barcode-type-card-preview svg {
  max-width: 100%;
  max-height: 100px;
}

.esfw-barcode-type-card-label {
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.esfw-barcode-type-card-desc {
  width: 100%;
  font-size: 11px;
  color: #6b7280;
}

.esfw-barcode-type-card-check {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 1;
  color: #7c3aed;
}

.esfw-barcode-type-card.selected {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.esfw-barcode-type-card.selected .esfw-barcode-type-card-check {
  display: block;
}

/* Product Barcode Generator: Live Preview (Advanced Settings tab) */
.esfw-barcode-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 20px;
  border-radius: 10px;
  position: relative;
  background: repeating-conic-gradient(#f3f4f6 0% 25%, #ffffff 0% 50%) 50% / 20px 20px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

#esfw-barcode-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}


.esfw-barcode-preview-image {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.esfw-barcode-preview-desc {
  margin-top: 12px;
  padding-top: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
  text-align: center;
  max-width: 240px;
}

.esfw-barcode-caption {
  font-size: 12px;
  color: #374151;
}

.esfw-barcode-loop {
  display: block;
  margin: 6px 0;
}

.esfw-barcode-error {
  display: inline-block;
  margin: 4px 0 0;
  padding: 4px 10px;
  border-radius: 6px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
}

.esfw-disabled {
  opacity: .45;
  pointer-events: none;
  filter: grayscale(100%);
  position: relative;
}

/*
 * Product Edit > Inventory > Product Badge > Custom
 *
 * The custom picker renders the same inline SVG markup used by the main
 * Badge Designs picker. Keep the SVG itself untouched: these rules only
 * control the card/container geometry and never set fill, stroke, color or
 * background on SVG descendants.
 */
.esfw-custom-badge-design-field .badge-style-wrapper {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  align-items: stretch;
}

.esfw-custom-badge-design-field .badge-style {
  min-width: 0;
  min-height: 96px;
  height: 96px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

.esfw-custom-badge-design-field .badge-style .esfw-badge-design-preview {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  overflow: hidden;
}

.esfw-custom-badge-design-field .badge-style .esfw-badge-design-preview>svg.esfw-design-svg {
  display: block;
  width: auto;
  height: 64px;
  max-width: 100%;
  max-height: 72px;
  flex: 0 1 auto;
  object-fit: contain;
  object-position: center;
  /* Preserve the SVG's own fill/stroke/gradient/filter/text styling. */
}

.esfw-custom-badge-design-field .badge-style:has(input[type="radio"]:checked) {
  border-color: var(--esfw-p-accent);
  background: var(--esfw-p-soft);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, .12);
}

.esfw-custom-badge-design-field .badge-style:hover {
  transform: translateY(-1px);
}

@media (max-width: 1024px) {
  .esfw-custom-badge-design-field .badge-style-wrapper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .esfw-custom-badge-design-field .badge-style-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .esfw-custom-badge-design-field .badge-style {
    min-height: 88px;
    height: 88px;
  }

  .esfw-custom-badge-design-field .badge-style .esfw-badge-design-preview>svg.esfw-design-svg {
    height: 58px;
    max-height: 64px;
  }
}


/* Product Edit: shared Image Badge source picker.
 * These cards only select the existing badge meanings/designs; they do not
 * introduce a second badge renderer.
 */
.esfw-product-image-badge-source {
  display: none;
  margin: 8px 0 18px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.esfw-product-image-badge-source[data-image-mode="yes"] {
  display: block;
}

.esfw-product-image-badge-source-title {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

.esfw-product-image-badge-source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.esfw-product-image-badge-source-option {
  margin: 0;
  cursor: pointer;
}

.esfw-product-image-badge-source-option>input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.esfw-product-image-badge-source-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 112px;
  padding: 10px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 9px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.esfw-product-image-badge-source-preview {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.esfw-product-image-badge-source-preview img {
  display: block;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.esfw-product-image-badge-source-preview-custom {
  border: 1px dashed #c4b5fd;
  border-radius: 10px;
  background: #faf5ff;
  color: #7c3aed;
}

.esfw-product-image-badge-source-preview-custom .dashicons {
  font-size: 28px;
  width: 28px;
  height: 28px;
}

.esfw-product-image-badge-source-option:hover .esfw-product-image-badge-source-card {
  border-color: #b7a0df;
  transform: translateY(-1px);
}

.esfw-product-image-badge-source-option.is-selected .esfw-product-image-badge-source-card {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, .12);
}

.esfw-product-image-badge-source-label {
  font-weight: 600;
  font-size: 13px;
  text-align: center;
}

.esfw-version {
  display: inline-block;
  font-size: 12px;
  vertical-align: middle;
  color: #6b7280;
}

@media (max-width: 782px) {
  .esfw-product-image-badge-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.esfw-barcode-warning {
  margin: 6px 10px;
  padding: 6px 8px !important;
  font-size: 12px;
  line-height: 1.4;
  background: #fff8e5;
  border-left: 3px solid #dba617;
  color: #50575e
}

.esfw-barcode-error {
  margin: 6px 0;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.4;
  background: #fcf0f1;
  border-left: 3px solid #d63638;
  color: #50575e
}