#mycred-addons {
  --mycred-addons-bg: #fafafc;
  --mycred-addons-header-bg: #FFFF;
  --mycred-addons-header-border: #eee9ff;
  --mycred-addons-card: #ffffff;
  --mycred-addons-ink: #2d1572;
  --mycred-addons-muted: #6b57a1;
  --mycred-addons-faint: #8875bd;
  --mycred-addons-placeholder: #a799ce;
  --mycred-addons-line: #e9e4f6;
  --mycred-addons-line-strong: #ddd2f9;
  --mycred-addons-brand: #8559ff;
  --mycred-addons-brand-active: #5e2ced;
  --mycred-addons-brand-soft: #f2eeff;
  --mycred-addons-brand-ring: rgba(133, 89, 255, 0.22);
  --mycred-addons-icon-bg: #f2eeff;
  --mycred-addons-plan-badge: #9077d2;
  --mycred-addons-tier-basic-text: #9077d2;
  --mycred-addons-tier-basic-border: #d0c6ec;
  --mycred-addons-tier-professional-text: #5e2ced;
  --mycred-addons-tier-professional-border: #c9b9f9;
  --mycred-addons-tier-business-text: #bc7d00;
  --mycred-addons-tier-business-border: #f1d49c;
  --mycred-addons-info-bg: #f0f6ff;
  --mycred-addons-info-text: #004cbe;
  --mycred-addons-stats-sep-color: #d8d3e7;
  --mycred-addons-r: 8px;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--mycred-addons-bg);
  color: var(--mycred-addons-ink);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#mycred-addons *,
#mycred-addons *::before,
#mycred-addons *::after {
  box-sizing: border-box;
}

#mycred-addons button {
  font-family: inherit;
}

#mycred-addons .mycred-addons-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 0 80px;
}

#mycred-addons .mycred-addons-shell {
  background: #fff;
  border: 1px solid var(--mycred-addons-header-border);
  border-radius: var(--mycred-addons-r);
  overflow: hidden;
}

#mycred-addons .mycred-addons-shell-body {
  padding: 0 24px 24px;
  background: #fff;
}

/* Page header */
#mycred-addons .mycred-addons-page-header {
  background: var(--mycred-addons-header-bg);
  border-bottom: 1px solid var(--mycred-addons-header-border);
  margin: 0;
  padding: 0 24px;
  min-height: 92px;
}

#mycred-addons .mycred-addons-page-header-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 23px 0 18px;
}

#mycred-addons .mycred-addons-page-header-left {
  flex: 1;
  min-width: 0;
}

#mycred-addons .mycred-addons-page-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  line-height: 1;
  color: var(--mycred-addons-ink);
}

#mycred-addons .mycred-addons-page-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 9px;
}

#mycred-addons .mycred-addons-user-plan-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}

#mycred-addons .mycred-addons-user-plan-badge--free {
  background: #fff;
  border: 1px solid #5e2ced;
  color: #5e2ced;
}

#mycred-addons .mycred-addons-user-plan-badge--basic {
  background: linear-gradient(9.54deg, #6165c6 47.03%, #7a7ed9 63.92%);
  color: #fff;
}

#mycred-addons .mycred-addons-user-plan-badge--professional {
  background: linear-gradient(5.88deg, #5e2ced 47.03%, #8559ff 63.92%);
  color: #fff;
}

#mycred-addons .mycred-addons-user-plan-badge--business {
  background: linear-gradient(7.59deg, #ffb31b 47.03%, #ffce6b 63.92%);
  color: #544424;
}

#mycred-addons .mycred-addons-user-plan-badge-skeleton {
  width: 76px;
  min-height: 19px;
  padding: 0;
  opacity: 0.4;
  animation: mycred-addons-plan-pulse 1.2s ease-in-out infinite;
}

@keyframes mycred-addons-plan-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.55;
  }
}

#mycred-addons .mycred-addons-page-header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Stats */
#mycred-addons .mycred-addons-stats {
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--mycred-addons-muted);
  font-size: 13px;
}

#mycred-addons .mycred-addons-stats b {
  color: var(--mycred-addons-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#mycred-addons .mycred-addons-stats-sep {
  width: 1px;
  height: 14px;
  background: var(--mycred-addons-stats-sep-color);
  margin: 0 12px;
}

#mycred-addons .mycred-addons-stats-on b {
  color: var(--mycred-addons-brand-active);
}

/* Plan banner */
#mycred-addons .mycred-addons-plan-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--mycred-addons-info-bg);
  margin: 0;
  padding: 14px 24px;
}

#mycred-addons .mycred-addons-plan-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

#mycred-addons .mycred-addons-plan-banner-icon {
  color: var(--mycred-addons-info-text);
  flex: none;
  margin-top: 1px;
}

#mycred-addons .mycred-addons-plan-banner p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--mycred-addons-info-text);
}

#mycred-addons .mycred-addons-plan-banner strong {
  font-weight: 600;
}

#mycred-addons .mycred-addons-plan-banner-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--mycred-addons-info-text);
  flex: none;
  line-height: 0;
}

/* Toolbar / tabs */
#mycred-addons .mycred-addons-toolbar {
  padding: 0;
  margin: 0 -24px;
  border-bottom: 1px solid var(--mycred-addons-line-strong);
}

#mycred-addons .mycred-addons-search {
  position: relative;
}

#mycred-addons .mycred-addons-search-header {
  width: 320px;
  max-width: 100%;
}

#mycred-addons .mycred-addons-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mycred-addons-placeholder);
  pointer-events: none;
}

#mycred-addons .mycred-addons-search input {
  width: 100%;
  height: 40px;
  padding: 0 12px 0 40px;
  border: 1px solid var(--mycred-addons-line-strong);
  border-radius: var(--mycred-addons-r);
  background: var(--mycred-addons-card);
  font: 400 14px inherit;
  color: var(--mycred-addons-ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#mycred-addons .mycred-addons-search input::placeholder {
  color: var(--mycred-addons-placeholder);
}

#mycred-addons .mycred-addons-search input:focus {
  border-color: var(--mycred-addons-brand);
  box-shadow: 0 0 0 3px var(--mycred-addons-brand-ring);
}

#mycred-addons .mycred-addons-ctl {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 40px;
  background: var(--mycred-addons-card);
  border: 1px solid var(--mycred-addons-line-strong);
  border-radius: var(--mycred-addons-r);
  padding: 0 12px;
  font: 400 14px inherit;
  color: var(--mycred-addons-muted);
  cursor: pointer;
  transition: border-color 0.15s;
  white-space: nowrap;
}

#mycred-addons .mycred-addons-ctl:focus-visible {
  outline: none;
  border-color: var(--mycred-addons-brand);
  box-shadow: 0 0 0 3px var(--mycred-addons-brand-ring);
}

#mycred-addons .mycred-addons-ctl svg {
  color: var(--mycred-addons-muted);
  flex-shrink: 0;
}

#mycred-addons .mycred-addons-ctl-val {
  color: var(--mycred-addons-brand);
  font-weight: 600;
}

/* Filter dropdown */
#mycred-addons .mycred-addons-filter-wrap {
  position: relative;
}

#mycred-addons .mycred-addons-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 228px;
  background: var(--mycred-addons-card);
  border: 1px solid var(--mycred-addons-line);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(45, 21, 114, 0.04),
    0 16px 40px -12px rgba(45, 21, 114, 0.18);
  padding: 8px;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 70;
}

#mycred-addons .mycred-addons-menu.mycred-addons-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#mycred-addons .mycred-addons-menu-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mycred-addons-placeholder);
  padding: 8px 10px 4px;
}

#mycred-addons .mycred-addons-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 7px;
  padding: 8px 10px;
  font: 500 13px inherit;
  color: var(--mycred-addons-ink);
  cursor: pointer;
  transition: background 0.12s;
}

#mycred-addons .mycred-addons-menu button.mycred-addons-sel {
  color: var(--mycred-addons-brand);
  font-weight: 600;
  background: var(--mycred-addons-brand-soft);
}

#mycred-addons .mycred-addons-menu button .mycred-addons-tick {
  margin-left: auto;
  opacity: 0;
}

#mycred-addons .mycred-addons-menu button.mycred-addons-sel .mycred-addons-tick {
  opacity: 1;
}

#mycred-addons .mycred-addons-menu hr {
  border: none;
  border-top: 1px solid var(--mycred-addons-line);
  margin: 6px 4px;
}

/* Tabs */
#mycred-addons .mycred-addons-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 0 24px;
  scrollbar-width: none;
}

#mycred-addons .mycred-addons-tabs::-webkit-scrollbar {
  display: none;
}

#mycred-addons .mycred-addons-tab {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
  padding: 9px 10px 11px;
  font: 500 13px inherit;
  color: var(--mycred-addons-muted);
  transition: color 0.15s;
}

#mycred-addons .mycred-addons-tab.mycred-addons-active {
  color: var(--mycred-addons-ink);
  font-weight: 600;
}

#mycred-addons .mycred-addons-tab.mycred-addons-active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  background: var(--mycred-addons-brand-active);
  border-radius: 1px 1px 0 0;
}

#mycred-addons .mycred-addons-tab-n {
  color: var(--mycred-addons-muted);
  font-weight: 400;
  font-size: 12px;
}

/* Sections */
#mycred-addons .mycred-addons-section {
  margin-top: 40px;
  container-type: inline-size;
  container-name: addons-section;
}

#mycred-addons .mycred-addons-sec-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

#mycred-addons .mycred-addons-sec-head h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.1px;
  margin: 0;
  color: var(--mycred-addons-ink);
}

#mycred-addons .mycred-addons-sec-head-sub {
  color: var(--mycred-addons-faint);
  font-size: 12px;
}

#mycred-addons .mycred-addons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  width: 100%;
}

@container addons-section (min-width: 640px) {
  #mycred-addons .mycred-addons-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@container addons-section (min-width: 1400px) {
  #mycred-addons .mycred-addons-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Card */
#mycred-addons .mycred-addons-card {
  background: var(--mycred-addons-card);
  border: 1px solid var(--mycred-addons-line);
  border-radius: var(--mycred-addons-r);
  padding: 16px 16px 0;
  display: flex;
  flex-direction: column;
  min-height: 210px;
}

#mycred-addons .mycred-addons-card-top {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

#mycred-addons .mycred-addons-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mycred-addons-icon-bg);
  border: none;
  color: var(--mycred-addons-muted);
  overflow: hidden;
}

#mycred-addons .mycred-addons-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  line-height: 0;
}

#mycred-addons .mycred-addons-icon-svg svg {
  width: 32px;
  height: 32px;
  display: block;
}

#mycred-addons .mycred-addons-icon-fallback {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--mycred-addons-brand-soft);
}

#mycred-addons .mycred-addons-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 8px;
  line-height: 1;
}

#mycred-addons .mycred-addons-tier.mycred-addons-basic {
  color: var(--mycred-addons-tier-basic-text);
  border-color: var(--mycred-addons-tier-basic-border);
}

#mycred-addons .mycred-addons-tier.mycred-addons-professional {
  color: var(--mycred-addons-tier-professional-text);
  border-color: var(--mycred-addons-tier-professional-border);
}

#mycred-addons .mycred-addons-tier.mycred-addons-business {
  color: var(--mycred-addons-tier-business-text);
  border-color: var(--mycred-addons-tier-business-border);
}

#mycred-addons .mycred-addons-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 0;
  letter-spacing: -0.1px;
  line-height: 1.3;
  color: var(--mycred-addons-ink);
}

#mycred-addons .mycred-addons-card-desc {
  color: var(--mycred-addons-muted);
  font-size: 12px;
  margin: 4px 0 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
  max-height: 36px;
  min-height: 36px;
}

#mycred-addons .mycred-addons-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--mycred-addons-line);
  margin: 30px -16px 0;
  padding: 12px 16px;
  min-height: 44px;
}

#mycred-addons .mycred-addons-card.mycred-addons-locked .mycred-addons-card-foot {
  min-height: 52px;
}

#mycred-addons .mycred-addons-foot-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#mycred-addons .mycred-addons-foot-sep {
  color: var(--mycred-addons-muted);
  font-size: 12px;
  line-height: 1;
}

#mycred-addons .mycred-addons-link {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  font: 500 12px/1 inherit;
  color: var(--mycred-addons-muted);
  padding: 0;
  transition: color 0.15s;
  text-decoration: none;
}

#mycred-addons .mycred-addons-link:hover {
  color: var(--mycred-addons-ink);
}

#mycred-addons .mycred-addons-link:disabled,
#mycred-addons .mycred-addons-link.mycred-addons-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

#mycred-addons .mycred-addons-state {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

#mycred-addons .mycred-addons-state-txt {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--mycred-addons-muted);
}

#mycred-addons .mycred-addons-card.mycred-addons-on .mycred-addons-state-txt {
  color: var(--mycred-addons-brand);
}

/* Switch */
#mycred-addons .mycred-addons-switch {
  position: relative;
  width: 28px;
  height: 14px;
  flex: none;
  cursor: pointer;
}

#mycred-addons .mycred-addons-switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  margin: 0;
  z-index: 1;
}

#mycred-addons .mycred-addons-track {
  position: absolute;
  inset: 0;
  border-radius: 9px;
  background: #dcdce6;
  transition: background 0.2s;
}

#mycred-addons .mycred-addons-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fcfcfd;
  box-shadow: 0 0.7px 2px rgba(16, 24, 40, 0.1), 0 0.7px 1.4px rgba(16, 24, 40, 0.06);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

#mycred-addons .mycred-addons-switch input:checked + .mycred-addons-track {
  background: var(--mycred-addons-brand);
}

#mycred-addons .mycred-addons-switch input:checked + .mycred-addons-track .mycred-addons-knob {
  transform: translateX(14px);
}

#mycred-addons .mycred-addons-switch input:focus-visible + .mycred-addons-track {
  box-shadow: 0 0 0 3px var(--mycred-addons-brand-ring);
}

#mycred-addons .mycred-addons-switch input:disabled {
  cursor: not-allowed;
}

#mycred-addons .mycred-addons-upgrade-btn {
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--mycred-addons-line-strong);
  border-radius: var(--mycred-addons-r);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--mycred-addons-ink);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#mycred-addons .mycred-addons-upgrade-btn svg {
  flex-shrink: 0;
  color: currentColor;
}

#mycred-addons .mycred-addons-install-btn {
  margin-left: auto;
  background: none;
  border: none;
  font: 500 12px inherit;
  color: var(--mycred-addons-brand);
  cursor: pointer;
  padding: 2px 0;
}

#mycred-addons .mycred-addons-install-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#mycred-addons .mycred-addons-hidden {
  display: none !important;
}

#mycred-addons .mycred-addons-empty {
  border: 1px dashed var(--mycred-addons-line-strong);
  border-radius: var(--mycred-addons-r);
  padding: 38px;
  text-align: center;
  color: var(--mycred-addons-muted);
  margin-top: 24px;
  font-size: 13px;
}
#mycred-addons .mycred-addons-install-note {
  margin: 32px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--mycred-addons-line);
  color: var(--mycred-addons-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* Skeleton */
#mycred-addons .mycred-addons-skeleton {
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
  background-size: 200% 100%;
  animation: mycred-addons-shimmer 1.2s infinite;
  border-radius: 6px;
}

@keyframes mycred-addons-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 900px) {
  #mycred-addons .mycred-addons-page-header-main {
    flex-direction: column;
    align-items: stretch;
  }

  #mycred-addons .mycred-addons-page-header-controls {
    flex-wrap: wrap;
  }

  #mycred-addons .mycred-addons-search-header {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 640px) {
  #mycred-addons .mycred-addons-wrap {
    padding: 0 0 60px;
  }

  #mycred-addons .mycred-addons-shell-body {
    padding: 0 16px 16px;
  }

  #mycred-addons .mycred-addons-page-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  #mycred-addons .mycred-addons-plan-banner {
    padding-left: 16px;
    padding-right: 16px;
  }

  #mycred-addons .mycred-addons-stats {
    flex-wrap: wrap;
    gap: 8px;
  }

  #mycred-addons .mycred-addons-stats-sep {
    display: none;
  }

  #mycred-addons .mycred-addons-search-header {
    width: 100%;
    order: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  #mycred-addons *,
  #mycred-addons *::before,
  #mycred-addons *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Full-bleed layout + consistent page background (wp-admin) */
body.mycred-addons-admin-page #wpwrap,
body.mycred-addons-admin-page #wpcontent,
body.mycred-addons-admin-page #wpbody,
body.mycred-addons-admin-page #wpbody-content {
  background-color: #fafafc !important;
}

body.mycred-addons-admin-page #wpfooter {
  background-color: #fafafc !important;
  border-top: none;
  color: #6b57a1;
}

body.mycred-addons-admin-page #myCRED-wrap > h1 {
  display: none;
}

body.mycred-addons-admin-page #myCRED-wrap {
  background: transparent;
  box-shadow: none;
  padding: 0;
  margin: 20px 20px 0 0;
  width: auto;
  max-width: none;
}

#myCRED-wrap #mycred-addons {
  margin: 0;
  width: 100%;
  max-width: none;
  background: transparent;
}

#mycred-addons .mycred-addons-boot-header {
  background: var(--mycred-addons-header-bg);
  border-bottom: 1px solid var(--mycred-addons-header-border);
  margin: 0;
  padding: 23px 24px 18px;
  min-height: 92px;
  position: relative;
}

#mycred-addons .mycred-addons-boot-header .mycred-addons-skeleton:first-child {
  height: 20px;
  width: 86px;
}

#mycred-addons .mycred-addons-boot-controls {
  position: absolute;
  top: 26px;
  right: 24px;
  display: flex;
  gap: 8px;
}

/* Toast notifications */
.mycred-addons-toaster [data-type="success"] > div > svg {
  color: #8559ff;
}
