/**
 * WGS WhatsApp Group Submitter — Frontend & Admin Styles
 *
 * ALL frontend rules are scoped under .wgs-wrapper to prevent theme conflicts.
 * Admin rules are scoped under .wgs-admin-wrap and .wgs-admin-table.
 *
 * Default Light Theme design system:
 *   --wgs-green:       #25D366  (WhatsApp brand)
 *   --wgs-green-dark:  #128C7E
 *   --wgs-green-light: #dcfce7
 *   --wgs-bg:          #f8fafc  (light background)
 *   --wgs-surface:     #ffffff  (pure white card)
 *   --wgs-surface-2:   #f1f5f9  (light slate input)
 *   --wgs-text:        #0f172a  (slate text)
 */

/* ============================================================
   0. RESET & ACCESSIBILITY
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

[hidden],
.wgs-hidden {
  display: none !important;
}

/* ============================================================
   1. CSS CUSTOM PROPERTIES (Light Theme Defaults)
   ============================================================ */
.wgs-wrapper {
  --wgs-font:         'Inter', system-ui, -apple-system, sans-serif;
  --wgs-green:        #25D366;
  --wgs-green-dark:   #128C7E;
  --wgs-green-glow:   rgba(37, 211, 102, 0.18);
  --wgs-green-light:  #dcfce7;
  --wgs-blue:         #4f46e5;
  --wgs-red:          #ef4444;
  --wgs-yellow:       #f59e0b;

  /* Light Surfaces */
  --wgs-bg:           transparent;
  --wgs-surface:      #ffffff;
  --wgs-surface-2:    #f1f5f9;
  --wgs-glass:        rgba(0, 0, 0, 0.02);
  --wgs-glass-border: #e2e8f0;

  /* Light Text */
  --wgs-text:         #0f172a;
  --wgs-text-muted:   #475569;
  --wgs-text-hint:    #64748b;

  /* Shape & Shadows */
  --wgs-radius-sm:    8px;
  --wgs-radius:       14px;
  --wgs-radius-lg:    20px;
  --wgs-shadow:       0 10px 30px -5px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
  --wgs-shadow-card:  0 2px 10px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);

  /* Transitions */
  --wgs-transition:   all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   2. WRAPPER RESET (Fixed Width & Theme Isolation)
   ============================================================ */
.wgs-wrapper {
  font-family: var(--wgs-font) !important;
  box-sizing: border-box !important;
  color: var(--wgs-text) !important;
  line-height: 1.6 !important;
  background-color: var(--wgs-bg) !important;
  padding: 20px 0 !important;
  width: 100% !important;
  clear: both !important;
  display: block !important;
}

.wgs-form-outer {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  clear: both !important;
}

.wgs-wrapper *,
.wgs-wrapper *::before,
.wgs-wrapper *::after {
  box-sizing: border-box !important;
}

/* ============================================================
   3. FORM WRAPPER (Fixed Max Size & Mobile Responsive)
   ============================================================ */
.wgs-form-wrapper,
div.wgs-form-wrapper,
.entry-content .wgs-form-wrapper,
.elementor-widget-shortcode .wgs-form-wrapper {
  background: var(--wgs-surface) !important;
  border-radius: var(--wgs-radius) !important;
  box-shadow: var(--wgs-shadow) !important;
  border: 1px solid var(--wgs-glass-border) !important;
  max-width: 500px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 28px 24px 24px !important;
  position: relative !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Gradient top border */
.wgs-form-wrapper::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 4px !important;
  background: linear-gradient(90deg, var(--wgs-green), var(--wgs-green-dark), #10b981) !important;
}

.wgs-form-header {
  text-align: center !important;
  margin-bottom: 20px !important;
}

.wgs-form-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 64px !important;
  height: 64px !important;
  background: var(--wgs-green-light) !important;
  border-radius: 50% !important;
  margin: 0 auto 12px !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25) !important;
}

.wgs-form-icon a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  text-decoration: none !important;
  border: none !important;
}

.wgs-form-icon img {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
  transition: transform 0.22s ease !important;
}

.wgs-form-icon a:hover img {
  transform: scale(1.1) !important;
}

.wgs-form-title {
  font-family: var(--wgs-font) !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--wgs-text) !important;
  line-height: 1.3 !important;
  text-align: center !important;
}

/* Side-by-side row for 2 columns in Paid Plan */
.wgs-form-row {
  display: flex !important;
  gap: 14px !important;
  width: 100% !important;
}

.wgs-form-row .wgs-field {
  flex: 1 !important;
  min-width: 0 !important;
}

@media (max-width: 576px) {
  .wgs-wrapper {
    padding: 10px 0 !important;
  }
  .wgs-form-wrapper {
    padding: 20px 16px 18px !important;
    border-radius: 12px !important;
    margin: 0 auto !important;
    max-width: 100% !important;
  }
  .wgs-form-header {
    margin-bottom: 16px !important;
  }
  .wgs-form-icon {
    width: 52px !important;
    height: 52px !important;
    margin-bottom: 10px !important;
  }
  .wgs-form-icon img {
    width: 36px !important;
    height: 36px !important;
  }
  .wgs-form-title {
    font-size: 1.15rem !important;
  }
  .wgs-form-row {
    flex-direction: column !important;
    gap: 0 !important;
  }
}

/* ============================================================
   4. FORM FIELDS (Standardized Input & Select Box)
   ============================================================ */
.wgs-field {
  margin-bottom: 16px !important;
  width: 100% !important;
  clear: both !important;
}

.wgs-label {
  display: block !important;
  font-family: var(--wgs-font) !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  color: var(--wgs-text) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
  float: none !important;
}

.wgs-required {
  color: var(--wgs-red) !important;
  margin-left: 2px !important;
  font-weight: 700 !important;
}

.wgs-optional {
  font-weight: 400 !important;
  font-size: 0.8rem !important;
  color: var(--wgs-text-hint) !important;
  margin-left: 4px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.wgs-input {
  display: block !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  line-height: 1.4 !important;
  padding: 10px 16px !important;
  background-color: var(--wgs-surface-2) !important;
  border: 1.5px solid var(--wgs-glass-border) !important;
  border-radius: var(--wgs-radius-sm) !important;
  color: var(--wgs-text) !important;
  font-family: var(--wgs-font) !important;
  font-size: 0.95rem !important;
  transition: var(--wgs-transition) !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  box-shadow: none !important;
}

select.wgs-select,
.wgs-select {
  display: block !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  line-height: 44px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 16px !important;
  padding-right: 38px !important;
  background-color: var(--wgs-surface-2) !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23475569'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 10px 6px !important;
  border: 1.5px solid var(--wgs-glass-border) !important;
  border-radius: var(--wgs-radius-sm) !important;
  color: var(--wgs-text) !important;
  font-family: var(--wgs-font) !important;
  font-size: 0.95rem !important;
  transition: var(--wgs-transition) !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  vertical-align: middle !important;
}

select.wgs-select option,
.wgs-select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
  padding: 8px 12px !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
}

@media (max-width: 576px) {
  .wgs-input,
  .wgs-select {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
  }
}

.wgs-input:focus,
.wgs-select:focus {
  border-color: var(--wgs-green) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px var(--wgs-green-glow) !important;
}

.wgs-input::placeholder {
  color: var(--wgs-text-hint) !important;
  opacity: 1 !important;
}

.wgs-input.wgs-input--error,
.wgs-select.wgs-select--error {
  border-color: var(--wgs-red) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18) !important;
}

.wgs-field-error {
  display: block !important;
  margin-top: 6px !important;
  font-size: 0.8rem !important;
  color: var(--wgs-red) !important;
  min-height: 1em !important;
}

.wgs-field-hint {
  display: block !important;
  margin-top: 6px !important;
  font-size: 0.8rem !important;
  color: var(--wgs-text-hint) !important;
}

/* ============================================================
   5. CHECKBOX (CONFIRM)
   ============================================================ */
.wgs-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.wgs-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.wgs-checkbox-custom {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--wgs-glass-border);
  background: var(--wgs-surface-2);
  transition: var(--wgs-transition);
  position: relative;
  margin-top: 2px;
}

.wgs-checkbox:checked + .wgs-checkbox-custom {
  background: var(--wgs-green);
  border-color: var(--wgs-green);
}

.wgs-checkbox:checked + .wgs-checkbox-custom::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.wgs-checkbox:focus-visible + .wgs-checkbox-custom {
  box-shadow: 0 0 0 3px var(--wgs-green-glow);
}

.wgs-checkbox-text {
  font-size: 0.875rem;
  color: var(--wgs-text-muted);
  line-height: 1.5;
}

/* ============================================================
   6. BUTTONS (Frontend Form & Directory)
   ============================================================ */
.wgs-wrapper .wgs-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: var(--wgs-radius-sm) !important;
  font-family: var(--wgs-font) !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
  border: none !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.wgs-wrapper .wgs-btn:hover {
  transform: translateY(-2px) !important;
}

.wgs-wrapper .wgs-btn:active {
  transform: translateY(0) scale(0.98) !important;
}

.wgs-wrapper .wgs-btn--primary {
  padding: 12px 24px !important;
  height: 48px !important;
  min-height: 48px !important;
  background: linear-gradient(135deg, var(--wgs-green), var(--wgs-green-dark)) !important;
  color: #ffffff !important;
  width: 100% !important;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3) !important;
  position: relative !important;
  overflow: hidden !important;
}

.wgs-wrapper .wgs-btn--primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45) !important;
  color: #ffffff !important;
}

.wgs-wrapper .wgs-btn--primary:active { transform: translateY(0) scale(0.98) !important; }

.wgs-wrapper .wgs-btn--primary:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.wgs-wrapper .wgs-btn--secondary {
  background: var(--wgs-surface);
  border: 1.5px solid var(--wgs-glass-border);
  color: var(--wgs-text);
  padding: 10px 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.wgs-wrapper .wgs-btn--secondary:hover {
  border-color: var(--wgs-green);
  color: var(--wgs-green-dark);
  background: var(--wgs-green-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.2);
}

.wgs-btn--join {
  background: linear-gradient(135deg, var(--wgs-green), var(--wgs-green-dark)) !important;
  color: #ffffff !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 0 11px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  line-height: 26px !important;
  border-radius: 99px !important;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25) !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  box-sizing: border-box !important;
}

.wgs-btn--join svg {
  width: 12px !important;
  height: 12px !important;
  transition: transform 0.2s ease;
  vertical-align: middle !important;
}

.wgs-btn--join:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
  color: #ffffff !important;
}

.wgs-btn--join:hover svg {
  transform: translateX(2px) !important;
}

.wgs-btn--report {
  background: rgba(239, 68, 68, 0.05) !important;
  border: 1px solid rgba(239, 68, 68, 0.25) !important;
  color: var(--wgs-red) !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  padding: 0 8px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  line-height: 24px !important;
  border-radius: 99px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  box-sizing: border-box !important;
}

.wgs-btn--report svg {
  width: 12px !important;
  height: 12px !important;
  vertical-align: middle !important;
}

.wgs-btn--report:hover {
  background: rgba(239, 68, 68, 0.12) !important;
  border-color: var(--wgs-red) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2) !important;
}

.wgs-btn-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wgs-spin 0.7s linear infinite;
}

@keyframes wgs-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   7. FORM ALERTS
   ============================================================ */
.wgs-form-alerts {
  margin-bottom: 20px;
}

.wgs-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--wgs-radius-sm);
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid transparent;
  animation: wgs-fadeIn 0.25s ease;
}

@keyframes wgs-fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wgs-alert--success {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.wgs-alert--error {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

/* ============================================================
   8. LISTING CONTROLS & LAYOUT
   ============================================================ */
.wgs-wrapper.wgs-listing-wrapper,
.wgs-listing-wrapper,
#wgs-listing-wrapper {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  clear: both !important;
  float: none !important;
  box-sizing: border-box !important;
}

/* Controls container: Full width row on top */
.wgs-wrapper .wgs-controls,
.wgs-controls,
#wgs-listing-wrapper > .wgs-controls {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  padding: 10px 14px !important;
  background: var(--wgs-surface) !important;
  border: 1px solid var(--wgs-glass-border) !important;
  border-radius: var(--wgs-radius) !important;
  box-shadow: var(--wgs-shadow-card) !important;
  box-sizing: border-box !important;
  margin-bottom: 24px !important;
  width: 100% !important;
  flex: 0 0 100% !important;
  max-width: 100% !important;
  clear: both !important;
  float: none !important;
}

.wgs-view-toggle {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

.wgs-filter-wrap {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
}

.wgs-search-wrap {
  position: relative !important;
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 140px !important;
  max-width: 100% !important;
  margin: 0 !important;
}

/* Legacy .wgs-filters-right kept for JS references but hidden */
.wgs-filters-right {
  display: none !important;
}

.wgs-filter-wrap,
.wgs-sort-wrap {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
}

.wgs-wrapper .wgs-search-wrap input#wgs-search,
.wgs-wrapper input.wgs-search-input,
.wgs-search-input {
  width: 100% !important;
  height: 38px !important;
  padding: 8px 16px 8px 42px !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  color: var(--wgs-text) !important;
  font-family: var(--wgs-font) !important;
  font-size: 0.9rem !important;
  outline: none !important;
  text-indent: 0 !important;
  transition: all 0.2s ease !important;
}

.wgs-search-input:focus {
  border-color: var(--wgs-green) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px var(--wgs-green-glow) !important;
}

.wgs-wrapper .wgs-search-wrap .wgs-search-icon,
.wgs-search-icon {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 1.05rem !important;
  line-height: 1 !important;
  pointer-events: none !important;
  z-index: 10 !important;
  color: var(--wgs-text-hint) !important;
}

.wgs-wrapper .wgs-controls select#wgs-category-filter,
#wgs-listing-wrapper select#wgs-category-filter,
.wgs-controls select#wgs-category-filter,
select#wgs-category-filter.wgs-select,
select#wgs-category-filter.wgs-select--small,
select#wgs-category-filter,
.wgs-select--small {
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  line-height: 36px !important;
  padding: 0 30px 0 12px !important;
  font-size: 0.85rem !important;
  width: auto !important;
  min-width: 130px !important;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  background-size: 10px 6px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  color: #334155 !important;
  box-sizing: border-box !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  vertical-align: middle !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.wgs-wrapper .wgs-view-btn,
.wgs-view-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background-color: #ffffff !important;
  color: #475569 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.18s ease !important;
}

.wgs-wrapper .wgs-view-btn svg,
.wgs-view-btn svg {
  width: 16px !important;
  height: 16px !important;
  fill: currentColor !important;
}

.wgs-wrapper .wgs-view-btn:hover,
.wgs-view-btn:hover {
  border-color: var(--wgs-green) !important;
  color: var(--wgs-green) !important;
  background-color: #f0fdf4 !important;
}

.wgs-wrapper .wgs-view-btn.wgs-view-btn--active,
.wgs-wrapper .wgs-view-btn[aria-pressed="true"],
.wgs-view-btn--active,
.wgs-view-btn[aria-pressed="true"] {
  border-color: var(--wgs-green) !important;
  background-color: var(--wgs-green) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
}

/* ============================================================
   9. GROUP CARDS GRID / LIST
   ============================================================ */
.wgs-wrapper .wgs-grid,
.wgs-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 20px !important;
  align-items: stretch !important;
  width: 100% !important;
  clear: both !important;
  box-sizing: border-box !important;
}

.wgs-grid.wgs-grid--cols-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.wgs-grid.wgs-grid--cols-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.wgs-grid.wgs-grid--cols-4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

.wgs-grid.wgs-grid--list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  grid-template-columns: none !important;
}

.wgs-wrapper .wgs-card {
  background: var(--wgs-surface);
  border: 1px solid var(--wgs-glass-border);
  border-radius: var(--wgs-radius);
  overflow: hidden;
  transition: var(--wgs-transition);
  box-shadow: var(--wgs-shadow-card);
  display: flex;
  flex-direction: column;
}

.wgs-wrapper .wgs-card:hover {
  transform: translateY(-4px);
  border-color: var(--wgs-green);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.wgs-wrapper .wgs-card.wgs-card--grid {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
  text-align: center !important;
  padding: 32px 12px 14px !important;
  min-height: 220px !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.wgs-wrapper .wgs-card.wgs-card--grid .wgs-card__header-badges {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  right: 12px !important;
  width: calc(100% - 24px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  z-index: 5 !important;
  pointer-events: none !important;
}

.wgs-wrapper .wgs-card.wgs-card--grid .wgs-card__badge-left {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.wgs-wrapper .wgs-card.wgs-card--grid .wgs-card__badge-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-left: auto !important;
}

.wgs-wrapper .wgs-card.wgs-card--grid .wgs-card__logo-wrap {
  margin-top: 2px !important;
  margin-bottom: 2px !important;
  flex-shrink: 0 !important;
}

.wgs-card--grid .wgs-card__logo,
.wgs-card--grid .wgs-card__logo-placeholder {
  width: 70px !important;
  height: 70px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2.5px solid #00a859 !important;
  box-shadow: 0 4px 14px rgba(0, 168, 89, 0.2) !important;
}

.wgs-wrapper .wgs-card.wgs-card--grid .wgs-card__body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin-bottom: 6px !important;
}

.wgs-wrapper .wgs-card.wgs-card--grid .wgs-card__title {
  margin: 0 !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

.wgs-wrapper .wgs-card.wgs-card--grid .wgs-card__actions {
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 8px !important;
  box-sizing: border-box !important;
  margin-top: auto !important;
}

.wgs-wrapper .wgs-card.wgs-card--grid .wgs-btn--join,
.wgs-card--grid .wgs-btn--join {
  padding: 0 11px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  line-height: 26px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  border-radius: 99px !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  box-sizing: border-box !important;
}

.wgs-wrapper .wgs-card.wgs-card--grid .wgs-btn--report,
.wgs-card--grid .wgs-btn--report {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 0 8px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  line-height: 24px !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  border-radius: 99px !important;
  flex-shrink: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-sizing: border-box !important;
}

.wgs-wrapper .wgs-card.wgs-card--list {
  position: relative !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 10px 14px !important;
  gap: 10px !important;
  min-height: 68px !important;
  height: auto !important;
  border-radius: 12px !important;
  background: var(--wgs-surface) !important;
  border: 1.5px solid var(--wgs-glass-border) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
  flex-wrap: nowrap !important;
  overflow: hidden !important;
}

.wgs-wrapper .wgs-card.wgs-card--list:hover {
  transform: translateY(-2px) !important;
  border-color: var(--wgs-green) !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06) !important;
}

.wgs-card--list .wgs-card__header-badges {
  position: static !important;
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.wgs-card--list .wgs-card__badge-left {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.wgs-card--list .wgs-card__badge-right,
.wgs-card--list .wgs-card__badge--new,
.wgs-card--list .wgs-card__badge--cat {
  display: none !important;
}

.wgs-card__pin-slot {
  width: 22px !important;
  min-width: 22px !important;
  height: 22px !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.wgs-card__pin-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 0.95rem !important;
  line-height: 1 !important;
  padding: 0 !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  animation: wgsPulse 2s ease-in-out infinite !important;
}

.wgs-card--list .wgs-card__logo-wrap {
  flex-shrink: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
}

.wgs-card--list .wgs-card__logo,
.wgs-card--list .wgs-card__logo-placeholder {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 2px solid #00a859 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
}

.wgs-card--list .wgs-card__body {
  flex: 1 !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  margin: 0 !important;
  gap: 2px !important;
}

.wgs-card__cat-pill {
  display: inline-block !important;
  background: #dcfce7 !important;
  color: #15803d !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  padding: 2px 9px !important;
  border-radius: 99px !important;
  border: 1px solid #86efac !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  width: fit-content !important;
  margin-bottom: 2px !important;
}

.wgs-card--list .wgs-card__title {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  color: var(--wgs-text) !important;
  margin: 0 !important;
  line-height: 1.3 !important;
}

.wgs-card--list .wgs-card__actions {
  margin-top: 0 !important;
  flex-shrink: 0 !important;
  align-items: center !important;
  justify-content: flex-end !important;
  display: flex !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
}

.wgs-wrapper .wgs-card.wgs-card--list .wgs-btn--join,
.wgs-card--list .wgs-btn--join {
  background: #00875a !important;
  color: #ffffff !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 0 11px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  line-height: 26px !important;
  border-radius: 99px !important;
  box-shadow: 0 2px 8px rgba(0, 168, 89, 0.25) !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.wgs-wrapper .wgs-card.wgs-card--list .wgs-btn--report,
.wgs-card--list .wgs-btn--report {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 0 8px !important;
  height: 26px !important;
  min-height: 26px !important;
  max-height: 26px !important;
  line-height: 24px !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  border-radius: 99px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-sizing: border-box !important;
}

.wgs-card__title a {
  color: inherit !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

.wgs-card__title a:hover {
  color: #128C7E !important;
  text-decoration: underline !important;
}

.wgs-card__badge {
  display: inline-block;
  background: var(--wgs-green-light);
  color: var(--wgs-green-dark);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid rgba(37, 211, 102, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wgs-card__badge--cat {
  background: #dcfce7 !important;
  color: #15803d !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  border-radius: 99px !important;
  border: 1px solid #86efac !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

.wgs-card__badge--new {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
  animation: wgsPulse 2s ease-in-out infinite;
}

@keyframes wgsPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.92; }
}

.wgs-card--pinned {
  border: 2px solid #f59e0b !important;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, var(--wgs-surface) 100%) !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.18), 0 2px 8px rgba(0,0,0,0.06) !important;
}

.wgs-card__badge--pinned {
  background: #f59e0b;
  color: #ffffff;
  border-color: #d97706;
  font-size: 0.85rem !important;
  padding: 3px 8px !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
  animation: wgsPulse 2s ease-in-out infinite;
}

.wgs-pin-btn {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1 !important;
  font-weight: 600;
}

.wgs-pin-btn--pinned {
  background: #fef3c7 !important;
  color: #b45309 !important;
  border-color: #f59e0b !important;
  font-weight: 700 !important;
}

.wgs-card__date {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--wgs-text-hint);
  margin-top: 6px;
}

.wgs-card--grid .wgs-card__date { justify-content: center; }

.wgs-card__actions {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  align-items: center !important;
  margin-top: 16px;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  justify-content: center;
}

.wgs-card--list .wgs-card__actions { margin-top: 0; justify-content: flex-end; }

/* ============================================================
   10. LOADING, EMPTY STATE, LOAD MORE
   ============================================================ */
.wgs-listing-loading {
  text-align: center;
  padding: 32px;
  color: var(--wgs-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.wgs-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(37, 211, 102, 0.3);
  border-top-color: var(--wgs-green);
  border-radius: 50%;
  animation: wgs-spin 0.7s linear infinite;
}

.wgs-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--wgs-text-muted);
}

.wgs-empty-icon {
  display: block;
  font-size: 3rem;
  margin-bottom: 16px;
}

.wgs-load-more-wrap {
  text-align: center;
  margin-top: 36px;
}

.wgs-total-count {
  font-size: 0.85rem;
  color: var(--wgs-text-hint);
  margin: 0 0 16px;
}

/* ============================================================
   11. UNIFIED ADMIN DESIGN SYSTEM & COMPONENTS (FLAT LIGHT SYSTEM)
   ============================================================ */
.wgs-admin-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
  color: #2c3338 !important;
  max-width: 100% !important;
  width: 100% !important;
  padding-right: 20px !important;
  box-sizing: border-box !important;
  margin: 20px 0 40px 0 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  background: transparent !important;
}

/* Hide number input up/down spin buttons */
.wgs-admin-wrap input[type="number"]::-webkit-outer-spin-button,
.wgs-admin-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
.wgs-admin-wrap input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* Page Title & Header */
.wgs-admin-wrap .wgs-admin-title {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  color: #1d2327 !important;
  margin: 0 0 20px 0 !important;
}

.wgs-admin-wrap .wgs-version-badge {
  font-size: 11px !important;
  font-weight: 600 !important;
  background: #f0f0f1 !important;
  color: #646970 !important;
  padding: 2px 8px !important;
  border-radius: 99px !important;
  border: 1px solid #c3c4c7 !important;
}

.wgs-admin-wrap .wgs-pro-badge {
  font-size: 11px !important;
  font-weight: 700 !important;
  background: #f59e0b !important;
  color: #ffffff !important;
  padding: 2px 8px !important;
  border-radius: 99px !important;
  letter-spacing: 0.04em !important;
}

/* Tabs Navigation */
.wgs-admin-wrap .wgs-tab-nav {
  display: flex !important;
  gap: 6px !important;
  border-bottom: 1px solid #c3c4c7 !important;
  padding-bottom: 0 !important;
  margin-bottom: 24px !important;
  flex-wrap: wrap !important;
}

.wgs-admin-wrap .wgs-tab {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  height: 38px !important;
  padding: 0 16px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #2c3338 !important;
  text-decoration: none !important;
  background: #f6f7f7 !important;
  border: 1px solid #c3c4c7 !important;
  border-bottom: none !important;
  border-radius: 6px 6px 0 0 !important;
  transition: all 0.15s ease-in-out !important;
  margin-bottom: -1px !important;
}

.wgs-admin-wrap .wgs-tab:hover {
  background: #ffffff !important;
  color: #2271b1 !important;
}

.wgs-admin-wrap .wgs-tab--active {
  background: #ffffff !important;
  color: #2271b1 !important;
  border-color: #c3c4c7 #c3c4c7 #ffffff !important;
  font-weight: 600 !important;
}

.wgs-admin-wrap .wgs-pro-lock {
  font-size: 12px !important;
}

/* Standardized Card Component (100% Flat Light Theme) */
.wgs-admin-wrap .wgs-card {
  background: #ffffff !important;
  border: 1px solid #c3c4c7 !important;
  border-radius: 8px !important;
  padding: 24px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  margin-bottom: 24px !important;
  position: relative !important;
  box-sizing: border-box !important;
  color: #2c3338 !important;
}

.wgs-admin-wrap .wgs-card__header {
  margin-bottom: 18px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #f0f0f1 !important;
}

.wgs-admin-wrap .wgs-card__title {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #1d2327 !important;
  margin: 0 0 4px 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.wgs-admin-wrap .wgs-card__desc {
  font-size: 13px !important;
  color: #646970 !important;
  margin: 0 !important;
}

.wgs-admin-wrap .wgs-card__body {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

/* Form Field Rows */
.wgs-admin-wrap .wgs-field-row {
  display: grid !important;
  grid-template-columns: 220px 1fr !important;
  gap: 16px !important;
  align-items: start !important;
  padding: 4px 0 !important;
}

@media (max-width: 782px) {
  .wgs-admin-wrap .wgs-field-row {
    grid-template-columns: 1fr !important;
  }
}

.wgs-admin-wrap .wgs-field-label {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1d2327 !important;
  padding-top: 8px !important;
}

.wgs-admin-wrap .wgs-field-control {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

/* Standardized Form Inputs */
.wgs-admin-wrap .wgs-admin-input,
.wgs-admin-wrap .wgs-admin-select,
.wgs-admin-wrap .wgs-admin-textarea {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 480px !important;
  height: 38px !important;
  padding: 0 12px !important;
  border: 1px solid #8c8f94 !important;
  border-radius: 4px !important;
  background-color: #ffffff !important;
  color: #2c3338 !important;
  font-size: 14px !important;
  font-family: inherit !important;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
  outline: none !important;
}

.wgs-admin-wrap #wgs_license_key {
  max-width: none !important;
  width: 550px !important;
}

.wgs-admin-wrap .wgs-admin-textarea {
  height: auto !important;
  padding: 10px 12px !important;
  font-family: monospace !important;
}

.wgs-admin-wrap .wgs-admin-input:focus,
.wgs-admin-wrap .wgs-admin-select:focus,
.wgs-admin-wrap .wgs-admin-textarea:focus {
  border-color: #2271b1 !important;
  box-shadow: 0 0 0 1px #2271b1 !important;
}

.wgs-admin-wrap .wgs-field-desc {
  font-size: 12px !important;
  color: #646970 !important;
  margin: 2px 0 0 0 !important;
}

/* Toggle Switch Component */
.wgs-admin-wrap .wgs-toggle-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  user-select: none !important;
}

.wgs-admin-wrap .wgs-toggle-input {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

.wgs-admin-wrap .wgs-toggle-switch {
  position: relative !important;
  width: 40px !important;
  height: 22px !important;
  background-color: #c3c4c7 !important;
  border-radius: 99px !important;
  transition: background-color 0.2s !important;
  flex-shrink: 0 !important;
}

.wgs-admin-wrap .wgs-toggle-switch::after {
  content: '' !important;
  position: absolute !important;
  top: 2px !important;
  left: 2px !important;
  width: 18px !important;
  height: 18px !important;
  background-color: #ffffff !important;
  border-radius: 50% !important;
  transition: transform 0.2s !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2) !important;
}

.wgs-admin-wrap .wgs-toggle-input:checked + .wgs-toggle-switch {
  background-color: #2271b1 !important;
}

.wgs-admin-wrap .wgs-toggle-input:checked + .wgs-toggle-switch::after {
  transform: translateX(18px) !important;
}

.wgs-admin-wrap .wgs-toggle-text {
  font-size: 14px !important;
  color: #2c3338 !important;
}

/* Unified Pro Locked Banner (Clean 16px / 20px Bottom Spacing) */
.wgs-admin-wrap .wgs-pro-banner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  background: #fffbeb !important;
  border: 1px solid #fde047 !important;
  border-radius: 8px !important;
  padding: 16px 20px !important;
  margin-top: 0 !important;
  margin-bottom: 24px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  position: relative !important;
  clear: both !important;
  z-index: 2 !important;
}

.wgs-admin-wrap .wgs-pro-banner__content {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.wgs-admin-wrap .wgs-pro-banner__icon {
  font-size: 22px !important;
  flex-shrink: 0 !important;
}

.wgs-admin-wrap .wgs-pro-banner__title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #92400e !important;
  margin: 0 !important;
}

.wgs-admin-wrap .wgs-pro-banner__desc {
  font-size: 13px !important;
  color: #b45309 !important;
  margin: 2px 0 0 0 !important;
}

.wgs-admin-wrap .wgs-pro-banner__action {
  flex-shrink: 0 !important;
}

/* Locked Card Overlay Style (Identical across all tabs) */
.wgs-admin-wrap .wgs-pro-locked-card {
  position: relative !important;
  opacity: 0.55 !important;
  pointer-events: none !important;
  filter: grayscale(0.25) !important;
  user-select: none !important;
}

/* Button System & Alignment */
.wgs-admin-wrap .wgs-btn-group {
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

.wgs-admin-wrap .wgs-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 38px !important;
  padding: 0 16px !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  transition: all 0.15s ease-in-out !important;
  border: 1px solid transparent !important;
}

.wgs-admin-wrap .wgs-btn--primary {
  background-color: #2271b1 !important;
  border-color: #2271b1 !important;
  color: #ffffff !important;
}

.wgs-admin-wrap .wgs-btn--primary:hover {
  background-color: #135e96 !important;
  border-color: #135e96 !important;
  color: #ffffff !important;
}

.wgs-admin-wrap .wgs-btn--secondary {
  background-color: #f6f7f7 !important;
  border-color: #2271b1 !important;
  color: #2271b1 !important;
}

.wgs-admin-wrap .wgs-btn--secondary:hover {
  background-color: #f0f6fc !important;
  color: #135e96 !important;
}

.wgs-admin-wrap .wgs-btn--danger {
  background-color: #fcf0f0 !important;
  border-color: #d9534f !important;
  color: #d9534f !important;
}

.wgs-admin-wrap .wgs-btn--danger:hover {
  background-color: #d9534f !important;
  border-color: #d9534f !important;
  color: #ffffff !important;
}

/* Image Preview Container (Hide when empty) */
#wgs-logo-preview-wrap:empty,
#wgs-logo-preview-wrap[hidden] {
  display: none !important;
}

/* Status Notifications */
.wgs-admin-wrap .wgs-license-status {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 14px 20px !important;
  border-radius: 8px !important;
  margin-bottom: 24px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.wgs-admin-wrap .wgs-license-status--valid {
  background: #edfaef !important;
  border: 1px solid #46b450 !important;
  color: #2e7d32 !important;
}

.wgs-admin-wrap .wgs-license-status--invalid {
  background: #fcf0f0 !important;
  border: 1px solid #dc3232 !important;
  color: #b71c1c !important;
}

.wgs-security-notice {
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 24px;
  color: #713f12;
  font-size: 0.875rem;
}

/* Admin Table */
.wgs-admin-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.wgs-admin-search {
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  min-width: 220px;
}

.wgs-status-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}

.wgs-status-tab {
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.8rem;
  text-decoration: none;
  color: #64748b;
  border: 1px solid #e2e8f0;
  transition: all 0.15s;
}

.wgs-status-tab:hover,
.wgs-status-tab--active {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
}

.wgs-admin-table-wrap {
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.wgs-admin-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.wgs-admin-table th {
  background: #f8fafc;
  padding: 8px 6px !important;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-sizing: border-box !important;
}

.wgs-admin-table td {
  padding: 6px 6px !important;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #374151;
  box-sizing: border-box !important;
}

.wgs-admin-table tr:last-child td { border-bottom: none; }
.wgs-admin-table tr:hover td { background: #f8fafc; }

.wgs-admin-logo-cell img {
  display: block;
  border-radius: 6px;
  object-fit: cover;
}

.wgs-admin-link {
  color: #128C7E;
  text-decoration: none;
  font-size: 0.82rem;
  word-break: break-all;
}

.wgs-admin-link:hover { text-decoration: underline; }

.wgs-admin-row-date { font-size: 0.75rem; color: #94a3b8; margin-top: 3px; }

.wgs-no-items {
  text-align: center;
  padding: 40px !important;
  color: #94a3b8;
  font-style: italic;
}

/* Status badges */
.wgs-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.wgs-status--approved { background: #dcfce7; color: #166534; }
.wgs-status--pending  { background: #fef3c7; color: #92400e; }
.wgs-status--rejected { background: #fee2e2; color: #991b1b; }

.wgs-report-count {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.8rem;
  background: #f1f5f9;
  color: #64748b;
}

.wgs-report-count--nonzero {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 600;
}

.wgs-admin-actions {
  vertical-align: middle !important;
  white-space: nowrap !important;
}

.wgs-actions-wrap {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
}

.wgs-pin-btn {
  width: 82px !important;
  min-width: 82px !important;
  text-align: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: all 0.15s ease !important;
}

.wgs-pin-btn--pinned {
  background: #fef3c7 !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
  font-weight: 700 !important;
}

.wgs-delete-btn {
  width: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  text-align: center !important;
  justify-content: center !important;
  display: inline-flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

#wgs-qe-category,
#wgs-qe-status {
  height: 40px !important;
  line-height: 1.4 !important;
  padding: 6px 28px 6px 12px !important;
  font-size: 13px !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  background-color: #ffffff !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  background-size: 10px 6px !important;
}

.wgs-admin-status-select {
  height: 32px !important;
  line-height: 1.2 !important;
  padding: 4px 28px 4px 10px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  cursor: pointer !important;
  margin: 0 !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  min-width: 105px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 9px center !important;
  background-size: 10px 6px !important;
}

.wgs-media-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

/* Ensure WordPress Media Library is always on top */
.media-modal {
  z-index: 9999999 !important;
}
.media-modal-backdrop {
  z-index: 9999998 !important;
}

/* Modal */
.wgs-modal {
  position: fixed;
  inset: 0;
  z-index: 100000 !important;
  display: none !important;
  align-items: center;
  justify-content: center;
}

.wgs-modal.wgs-modal--open,
.wgs-modal:not([hidden]):not(.wgs-modal--closed) {
  display: flex !important;
}

.wgs-modal[hidden],
.wgs-modal.wgs-modal--closed {
  display: none !important;
}

.wgs-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.wgs-modal__content {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  width: min(480px, 90vw);
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  animation: wgs-fadeIn 0.2s ease;
}

.wgs-modal__content h2 {
  margin: 0 0 20px;
  font-size: 1.1rem;
  color: #0f172a;
}

.wgs-modal__preview-wrap {
  text-align: center;
  margin-bottom: 16px;
}

.wgs-modal__actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* ============================================================
   12. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .wgs-form-wrapper {
    width: 92% !important;
    max-width: 440px !important;
    margin: 16px auto !important;
    padding: 22px 18px 20px !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.03) !important;
  }

  .wgs-form-header {
    margin-bottom: 20px !important;
  }

  .wgs-form-icon {
    width: 52px !important;
    height: 52px !important;
    margin-bottom: 12px !important;
  }

  .wgs-form-icon img {
    width: 28px !important;
    height: 28px !important;
  }

  .wgs-form-title {
    font-size: 1.25rem !important;
    margin-bottom: 4px !important;
  }

  .wgs-form-subtitle {
    font-size: 0.82rem !important;
  }

  .wgs-field {
    margin-bottom: 15px !important;
  }

  .wgs-label {
    font-size: 0.78rem !important;
    margin-bottom: 5px !important;
  }

  .wgs-input,
  .wgs-select {
    padding: 10px 12px !important;
    font-size: 0.88rem !important;
    height: 42px !important;
    border-radius: 8px !important;
  }

  .wgs-field-hint {
    font-size: 0.75rem !important;
    margin-top: 4px !important;
  }

  .wgs-checkbox-label {
    gap: 10px !important;
  }

  .wgs-checkbox-custom {
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px !important;
    margin-top: 1px !important;
  }

  .wgs-checkbox-text {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }

  .wgs-wrapper .wgs-btn--primary {
    padding: 11px 20px !important;
    font-size: 0.9rem !important;
    border-radius: 8px !important;
  }

  /* Mobile Listing Wrapper Spacing */
  .wgs-listing-wrapper {
    padding: 0 12px !important;
    box-sizing: border-box !important;
  }

  /* Controls mobile: Row 1 = Grid/List toggle + Category filter, Row 2 = Search */
  .wgs-wrapper .wgs-controls,
  #wgs-listing-wrapper > .wgs-controls,
  .wgs-controls {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    padding: 8px 10px !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .wgs-wrapper .wgs-controls .wgs-view-toggle,
  .wgs-controls .wgs-view-toggle,
  .wgs-view-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex: 0 0 auto !important;
    order: 1 !important;
  }

  .wgs-wrapper .wgs-controls .wgs-view-btn,
  .wgs-controls .wgs-view-btn,
  .wgs-view-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    box-sizing: border-box !important;
  }

  .wgs-wrapper .wgs-controls .wgs-filter-wrap,
  .wgs-controls .wgs-filter-wrap,
  .wgs-filter-wrap {
    display: inline-flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    order: 2 !important;
  }

  .wgs-wrapper .wgs-controls select#wgs-category-filter,
  #wgs-listing-wrapper select#wgs-category-filter,
  .wgs-controls select#wgs-category-filter,
  select#wgs-category-filter,
  .wgs-select--small {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    line-height: 34px !important;
    padding: 0 26px 0 10px !important;
    font-size: 0.82rem !important;
    box-sizing: border-box !important;
  }

  .wgs-wrapper .wgs-controls .wgs-search-wrap,
  .wgs-controls .wgs-search-wrap,
  .wgs-search-wrap {
    display: block !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 4px 0 0 0 !important;
    order: 3 !important;
  }

  .wgs-wrapper .wgs-search-wrap input#wgs-search,
  .wgs-wrapper input.wgs-search-input,
  .wgs-search-input {
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    line-height: 34px !important;
    padding: 0 12px 0 38px !important;
    font-size: 0.85rem !important;
    box-sizing: border-box !important;
  }

  /* Grid: 2 columns on tablet */
  .wgs-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* List card: stay horizontal, wrap actions below if needed */
  .wgs-wrapper .wgs-card.wgs-card--list {
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 8px 10px !important;
    gap: 8px !important;
  }

  .wgs-card--list .wgs-card__body {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .wgs-card--list .wgs-card__title {
    font-size: 0.85rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .wgs-card--list .wgs-card__actions {
    flex-shrink: 0 !important;
    gap: 5px !important;
  }

  .wgs-wrapper .wgs-card.wgs-card--list .wgs-btn--join,
  .wgs-card--list .wgs-btn--join,
  a.wgs-btn--join {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 24px !important;
    padding: 0 8px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    border-radius: 99px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .wgs-wrapper .wgs-card.wgs-card--list .wgs-btn--report,
  .wgs-card--list .wgs-btn--report,
  button.wgs-btn--report {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 22px !important;
    padding: 0 6px !important;
    font-size: 0.62rem !important;
    font-weight: 600 !important;
    border-radius: 99px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .wgs-card__pin-slot {
    width: 16px !important;
    min-width: 16px !important;
  }

  .wgs-card--list .wgs-card__logo,
  .wgs-card--list .wgs-card__logo-placeholder {
    width: 40px !important;
    height: 40px !important;
  }

  .wgs-cat-layout {
    flex-direction: column;
  }

  .wgs-cat-form-col {
    flex: 1 1 100%;
    width: 100%;
  }

  .wgs-admin-controls { flex-direction: column; align-items: stretch; }
  .wgs-status-tabs { margin-left: 0; }
}

@media (max-width: 480px) {
  .wgs-form-wrapper {
    width: 90% !important;
    max-width: 380px !important;
    padding: 20px 14px 18px !important;
    margin: 12px auto !important;
    border-radius: 14px !important;
  }

  .wgs-form-title { font-size: 1.15rem !important; }
  .wgs-form-subtitle { font-size: 0.78rem !important; }

  .wgs-input,
  .wgs-select {
    height: 40px !important;
    font-size: 0.85rem !important;
    padding: 8px 12px !important;
  }

  /* Grid: single column on very small screens */
  .wgs-grid {
    grid-template-columns: 1fr !important;
  }

  .wgs-grid.wgs-grid--cols-2,
  .wgs-grid.wgs-grid--cols-3,
  .wgs-grid.wgs-grid--cols-4 {
    grid-template-columns: 1fr !important;
  }

  /* List: keep horizontal even on very small screens */
  .wgs-wrapper .wgs-card.wgs-card--list {
    flex-wrap: nowrap !important;
    flex-direction: row !important;
    padding: 7px 8px !important;
    gap: 6px !important;
  }

  .wgs-card--list .wgs-card__body {
    min-width: 0 !important;
    flex: 1 1 0 !important;
  }

  .wgs-card--list .wgs-card__title {
    font-size: 0.78rem !important;
  }

  .wgs-wrapper .wgs-card.wgs-card--list .wgs-btn--join,
  .wgs-card--list .wgs-btn--join,
  a.wgs-btn--join {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 24px !important;
    padding: 0 8px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    border-radius: 99px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .wgs-wrapper .wgs-card.wgs-card--list .wgs-btn--report,
  .wgs-card--list .wgs-btn--report,
  button.wgs-btn--report {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 22px !important;
    padding: 0 6px !important;
    font-size: 0.6rem !important;
    font-weight: 600 !important;
    border-radius: 99px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  /* Grid card smaller on tiny screens */
  .wgs-wrapper .wgs-card.wgs-card--grid {
    padding: 26px 10px 12px !important;
    min-height: 190px !important;
  }

  .wgs-card--grid .wgs-card__logo,
  .wgs-card--grid .wgs-card__logo-placeholder {
    width: 56px !important;
    height: 56px !important;
  }

  .wgs-wrapper .wgs-card.wgs-card--grid .wgs-btn--join,
  .wgs-card--grid .wgs-btn--join {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 24px !important;
    padding: 0 8px !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    border-radius: 99px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .wgs-wrapper .wgs-card.wgs-card--grid .wgs-btn--report,
  .wgs-card--grid .wgs-btn--report {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 22px !important;
    padding: 0 6px !important;
    font-size: 0.6rem !important;
    font-weight: 600 !important;
    border-radius: 99px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   GROUP CATEGORIES PAGE STYLING (edit-tags.php?taxonomy=wgs_category)
   ============================================================ */
body.taxonomy-wgs_category,
body.taxonomy-wgs_category #wpcontent,
body.taxonomy-wgs_category #wpbody,
body.taxonomy-wgs_category #wpbody-content,
body.taxonomy-wgs_category .wrap {
  overflow-x: hidden !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

body.taxonomy-wgs_category #wpbody-content {
  padding-right: 15px !important;
}

body.taxonomy-wgs_category .wrap > h1.wp-heading-inline,
body.taxonomy-wgs_category .wrap > a.page-title-action,
body.taxonomy-wgs_category .wrap > hr.wp-header-end {
  display: none !important;
}

body.taxonomy-wgs_category #col-container {
  display: flex !important;
  gap: 20px !important;
  align-items: flex-start !important;
  margin-top: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

@media (max-width: 960px) {
  body.taxonomy-wgs_category #col-container {
    flex-direction: column !important;
  }
}

/* Left Column: Search Categories + Add Category Form Card */
body.taxonomy-wgs_category #col-left {
  flex: 0 0 320px !important;
  width: 320px !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Custom Category Search Card at Top of Left Column (Single Horizontal Row) */
body.taxonomy-wgs_category p.search-box {
  display: none !important;
}

body.taxonomy-wgs_category #wgs-cat-search-card {
  margin-bottom: 16px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 14px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03) !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

body.taxonomy-wgs_category #wgs-cat-search-card form {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
}

body.taxonomy-wgs_category #wgs-cat-search-card input[type="search"] {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  height: 36px !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  background: #f8fafc !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  box-sizing: border-box !important;
  outline: none !important;
  margin: 0 !important;
}

body.taxonomy-wgs_category #wgs-cat-search-card input[type="search"]:focus {
  border-color: #10b981 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

body.taxonomy-wgs_category #wgs-cat-search-card button#wgs-cat-search-submit {
  flex: 0 0 auto !important;
  height: 36px !important;
  border-radius: 6px !important;
  background: #10b981 !important;
  border: 1px solid #059669 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2) !important;
  margin: 0 !important;
}

body.taxonomy-wgs_category #wgs-cat-search-card button#wgs-cat-search-submit:hover {
  background: #059669 !important;
}

/* Add Category Form Box */
body.taxonomy-wgs_category #col-left .form-wrap {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 22px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03) !important;
  box-sizing: border-box !important;
}

body.taxonomy-wgs_category #col-left .form-wrap > h2 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 0 16px 0 !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

/* Hide Parent Category & Description fields */
body.taxonomy-wgs_category #col-left .form-field.term-parent-wrap,
body.taxonomy-wgs_category #col-left .form-field.term-description-wrap {
  display: none !important;
}

body.taxonomy-wgs_category #col-left .form-field {
  margin-bottom: 16px !important;
}

body.taxonomy-wgs_category #col-left .form-field label {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-bottom: 6px !important;
  display: block !important;
}

body.taxonomy-wgs_category #col-left .form-field input[type="text"],
body.taxonomy-wgs_category #col-left .form-field select,
body.taxonomy-wgs_category #col-left .form-field textarea {
  width: 100% !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  color: #0f172a !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

body.taxonomy-wgs_category #col-left .form-field input[type="text"]:focus,
body.taxonomy-wgs_category #col-left .form-field select:focus,
body.taxonomy-wgs_category #col-left .form-field textarea:focus {
  border-color: #10b981 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
  outline: none !important;
}

body.taxonomy-wgs_category #col-left .form-field p {
  font-size: 11px !important;
  color: #64748b !important;
  margin-top: 4px !important;
  line-height: 1.4 !important;
}

body.taxonomy-wgs_category #col-left input#submit,
body.taxonomy-wgs_category #col-left p.submit input {
  background: #10b981 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border-radius: 6px !important;
  height: 38px !important;
  padding: 0 20px !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25) !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  text-shadow: none !important;
}

body.taxonomy-wgs_category #col-left input#submit:hover,
body.taxonomy-wgs_category #col-left p.submit input:hover {
  background: #059669 !important;
  border-color: #047857 !important;
}

/* Right Column: Category Table Card */
body.taxonomy-wgs_category #col-right {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03) !important;
  box-sizing: border-box !important;
  overflow-x: hidden !important;
}

body.taxonomy-wgs_category #col-right .tablenav.top,
body.taxonomy-wgs_category #col-right .tablenav.bottom {
  margin-bottom: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

body.taxonomy-wgs_category #col-right select[name="action"],
body.taxonomy-wgs_category #col-right select[name="action2"] {
  height: 34px !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 13px !important;
  padding: 0 24px 0 10px !important;
  background: #f8fafc !important;
  color: #334155 !important;
}

body.taxonomy-wgs_category #col-right input#doaction,
body.taxonomy-wgs_category #col-right input#doaction2 {
  height: 34px !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  padding: 0 14px !important;
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #475569 !important;
  cursor: pointer !important;
  text-shadow: none !important;
}

body.taxonomy-wgs_category table.wp-list-table {
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  border-collapse: collapse !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02) !important;
  width: 100% !important;
  table-layout: fixed !important;
}

/* Hide Description Column from table */
body.taxonomy-wgs_category table.wp-list-table .column-description {
  display: none !important;
}

body.taxonomy-wgs_category table.wp-list-table .column-cb { width: 38px !important; }
body.taxonomy-wgs_category table.wp-list-table .column-name { width: 45% !important; }
body.taxonomy-wgs_category table.wp-list-table .column-slug { width: 35% !important; }
body.taxonomy-wgs_category table.wp-list-table .column-posts { width: 20% !important; }

body.taxonomy-wgs_category table.wp-list-table thead th,
body.taxonomy-wgs_category table.wp-list-table tfoot th {
  background: #f8fafc !important;
  font-weight: 700 !important;
  color: #475569 !important;
  font-size: 11px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 10px 12px !important;
}

/* Header link styling — prevent green background pill on header text */
body.taxonomy-wgs_category table.wp-list-table thead th a,
body.taxonomy-wgs_category table.wp-list-table tfoot th a {
  background: transparent !important;
  color: #475569 !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

body.taxonomy-wgs_category table.wp-list-table thead th a:hover {
  color: #10b981 !important;
}

body.taxonomy-wgs_category table.wp-list-table tbody td {
  padding: 10px 12px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
  font-size: 13px !important;
}

body.taxonomy-wgs_category table.wp-list-table tbody tr:hover td {
  background: #f8fafc !important;
}

body.taxonomy-wgs_category table.wp-list-table .column-name strong a {
  color: #0f172a !important;
  font-weight: 700 !important;
  font-size: 13px !important;
}

/* Body cell count badge styling — ONLY in tbody rows */
body.taxonomy-wgs_category table.wp-list-table tbody td.column-posts {
  text-align: center !important;
}

body.taxonomy-wgs_category table.wp-list-table tbody td.column-posts a,
body.taxonomy-wgs_category table.wp-list-table tbody td.column-posts span {
  background: #dcfce7 !important;
  color: #15803d !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  padding: 3px 10px !important;
  border-radius: 99px !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 20px !important;
}

/* ============================================================
   POST EMBED TABLE STYLES ([wgs_post_groups] & [wgs_category_groups])
   ============================================================ */
.wgs-post-table-container {
  width: 100% !important;
  max-width: 800px !important;
  margin: 24px auto !important;
  display: block !important;
  clear: both !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
  border-radius: 12px !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04) !important;
  background: #ffffff !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

.wgs-post-table {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  border-collapse: collapse !important;
  text-align: center !important;
  font-size: 14px !important;
  color: #1e293b !important;
  border-spacing: 0 !important;
}

.wgs-post-table thead tr {
  background: #005c29 !important; /* Dark Green header matching user screenshot */
  color: #ffffff !important;
}

.wgs-post-table th {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  text-transform: capitalize;
  border: none !important;
  color: #ffffff !important;
  text-align: center !important;
}

.wgs-post-table tbody tr {
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.15s ease;
}

.wgs-post-table tbody tr:hover {
  background: #f8fafc;
}

.wgs-post-table td {
  padding: 12px 16px;
  vertical-align: middle;
  border-right: 1px solid #f1f5f9;
}

.wgs-post-table td:last-child {
  border-right: none;
}

.wgs-table-logo-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #25D366;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
}

.wgs-table-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.wgs-table-join-btn {
  background: #005c29 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 6px 18px !important;
  border-radius: 6px !important;
  text-decoration: none !important;
  display: inline-block !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
  transition: all 0.15s ease !important;
}

.wgs-table-join-btn:hover {
  background: #25D366 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .wgs-post-table th,
  .wgs-post-table td {
    padding: 8px 10px;
    font-size: 12px;
  }
  .wgs-table-logo-circle {
    width: 36px;
    height: 36px;
  }
  .wgs-table-join-btn {
    padding: 5px 12px !important;
    font-size: 12px !important;
  }
}



/* ==========================================================================
   BULK CSV UPLOAD DROPZONE COMPONENT
   ========================================================================== */
.wgs-csv-dropzone {
  position: relative !important;
  border: 2px dashed #cbd5e1 !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
  padding: 24px 16px !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  max-width: 480px !important;
  box-sizing: border-box !important;
}

.wgs-csv-dropzone:hover,
.wgs-csv-dropzone.wgs-drag-over {
  border-color: #25D366 !important;
  background: #f0fdf4 !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.15) !important;
}

.wgs-csv-dropzone-input {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 5 !important;
}

.wgs-csv-dropzone-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  pointer-events: none !important;
}

.wgs-csv-dropzone-icon {
  font-size: 32px !important;
  line-height: 1 !important;
}

.wgs-csv-dropzone-title {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.wgs-csv-dropzone-title strong {
  font-size: 14px !important;
  color: #0f172a !important;
}

.wgs-csv-dropzone-title span {
  font-size: 12px !important;
  color: #64748b !important;
}

.wgs-csv-dropzone-file-name {
  display: inline-block !important;
  margin-top: 6px !important;
  padding: 4px 14px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 99px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #128C7E !important;
  max-width: 90% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}


