/* ─── Filter Bar ─── */
.wpbylm-license-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.wpbylm-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

.wpbylm-filter-btn:hover {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.3);
}

.wpbylm-filter-btn.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
}

.wpbylm-filter-count {
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
}

.wpbylm-filter-btn.is-active .wpbylm-filter-count {
  background: rgba(255, 255, 255, 0.15);
}

/* ─── License Grid ─── */
.wpbylm-licenses-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

/* ─── License Card ─── */
.wpbylm-license-card {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

/* ─── Card Header ─── */
.wpbylm-license-card-header {
  padding: 20px 24px;
}

.wpbylm-license-product {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.wpbylm-license-product h3 {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: white;
}

/* ─── Status Badges ─── */
.license-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.license-status-active,
.license-status-publish {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.license-status-inactive {
  background-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.12);
}

.license-status-expired {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.license-status-revoked {
  background-color: rgba(107, 114, 128, 0.15);
  color: rgba(255, 255, 255, 0.35);
  border-color: rgba(107, 114, 128, 0.3);
}

/* ─── Card Body ─── */
.wpbylm-license-card-body {
  padding: 24px;
}

/* ─── Shared Label ─── */
.wpbylm-license-key-section label,
.wpbylm-license-detail label {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

/* ─── License Key ─── */
.wpbylm-license-key-section {
  margin-bottom: 24px;
}

.wpbylm-license-key-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.wpbylm-license-key-display {
  width: 100%;
  display: block;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 12px 24px;
  padding-right: 56px;
  height: 52px;
  border-radius: 12px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  color: white;
  letter-spacing: 0.5px;
  line-height: calc(52px - 24px);
}

.copy-license {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: none;
  padding: 0;
  width: 32px;
  height: 32px;
  cursor: pointer;
  box-shadow: none;
}

.copy-license:hover {
  color: white;
}

.copy-license .material-icons {
  font-size: 18px;
}

/* ─── License Details Grid ─── */
.wpbylm-license-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 1.25rem;
}

/* ─── Expiry ─── */
.wpbylm-license-detail {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wpbylm-license-detail label {
  flex-shrink: 0;
  margin-bottom: 0;
}

.wpbylm-license-details .wpbylm-license-detail {
  display: block;
}

.wpbylm-license-details .wpbylm-license-detail label {
  display: block;
  margin-bottom: 8px;
}

.expiry-date {
  font-size: 14px;
  color: white;
}

.expiry-never {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

/* ─── Domain List ─── */
.wpbylm-domain-list {
  list-style: none !important;
  margin: 8px 0 0 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wpbylm-domain-list li {
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px 24px;
  padding-right: 56px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  height: 52px;
}

.wpbylm-domain-name {
  color: white;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  word-break: break-all;
  line-height: calc(52px - 24px);
}

.wpbylm-remove-domain {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.5) !important;
  border: none !important;
  padding: 0 !important;
  width: 32px !important;
  height: 32px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: none !important;
}

.wpbylm-remove-domain:hover {
  color: white !important;
}

.wpbylm-remove-domain .material-icons {
  font-size: 18px !important;
}

.wpbylm-no-domains {
  color: rgba(255, 255, 255, 0.25);
  font-size: 13px;
  margin: 4px 0 0 0 !important;
  font-style: italic;
}

.wpbylm-domain-note {
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  margin: 8px 0 0 0 !important;
  font-style: italic;
  line-height: 1.5;
}

/* ─── Card Footer ─── */
.wpbylm-license-card-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wpbylm-footer-left {
  flex-shrink: 0;
}

.wpbylm-footer-right {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}

/* ─── Footer Download ─── */
.wpbylm-footer-download {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wpbylm-version-select {
  appearance: none;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="%23fff"><path d="M480-345 240-585l56-56 184 183 184-183 56 56-240 240Z"/></svg>');
  background-size: 16px 16px;
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  color: white;
  font-size: 14px;
  padding: 7px 32px 7px 16px;
  cursor: pointer;
}

/* ─── Footer Buttons ─── */
.view-order {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 7px 16px;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.view-order:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.45);
  color: white;
  text-decoration: none;
}


/* ─── Renew License ─── */
.renew-license {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4f46e5;
  color: white !important;
  border: 2px solid #4f46e5;
  padding: 7px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.renew-license:hover {
  opacity: 0.75;
  text-decoration: none;
}

/* ─── Notifications ─── */
.wpbylm-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 14px 20px;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  animation: wpbylm-slide-in 0.3s ease-in-out;
  max-width: 350px;
  pointer-events: auto;
}

.wpbylm-notification.success {
  background: #10b981;
}

.wpbylm-notification.error {
  background: #ef4444;
}

@keyframes wpbylm-slide-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ─── Product Page License Info ─── */
.license-info {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 20px 0;
}

.license-info h3 {
  margin: 0 0 16px 0;
  font-family: 'Raleway', sans-serif;
  color: white;
  font-size: 16px;
  font-weight: 700;
}

.license-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.license-details li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.license-details li:last-child {
  border-bottom: none;
}

.license-details strong {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}

.license-info-loop {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.license-duration {
  background: rgba(79, 70, 229, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(79, 70, 229, 0.3);
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.license-domains {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Responsive ─── */
@media screen and (max-width: 767px) {
  .wpbylm-license-details {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .wpbylm-license-key {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-license {
    justify-content: center;
  }

  .wpbylm-license-card-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .wpbylm-footer-left,
  .wpbylm-footer-right {
    justify-content: center;
    margin-left: 0;
  }
}

@media screen and (max-width: 480px) {
  .wpbylm-license-card-header,
  .wpbylm-license-card-body,
  .wpbylm-license-card-footer {
    padding: 16px;
  }

  .wpbylm-license-product h3 {
    font-size: 16px;
  }
}

/* ─── Order deeplink highlight ─── */
.wpbylm-license-card.license--highlighted {
  outline: 1px solid rgba(255, 255, 255, 0.50);
}
