.cpl-plugin-info-box {
  overflow: hidden;
}

.cpl-plugin-list-item {
  margin-bottom: 8px;
}

/* Suppress TW's default border/shadow on tab content */
.cpl-layout-container .tc-tab-content,
.cpl-layout-container .tc-reveal,
.cpl-layout-container .tc-tab-set-item {
  border: none !important;
  box-shadow: none !important;
}

.cpl-plugin-info-box > .tc-plugin-info {
  margin: 0 !important;
  border: none !important;
}

.cpl-plugin-info-box > .tc-plugin-info-dropdown {
  margin-top: 0 !important;
  border: none !important;
}

.cpl-plugin-info-box > .tc-plugin-info-dropdown,
.cpl-plugin-info-box > .tc-plugin-info-dropdown > .tc-plugin-info-dropdown-message,
.cpl-plugin-info-box > .tc-plugin-info-dropdown > .tc-plugin-info-dropdown-body {
  background: transparent !important;
  background-color: transparent !important;
}

.cpl-latest-version-icon > svg,
.cpl-installed-version-icon > svg {
  height: 1em;
  width: 1em;
}

.cpl-plugin-search {
  flex-grow: 1;
  width: 0;
}

.cpl-plugin-search span {
  display: inline-block;
  width: 100%;
}

.cpl-plugin-search span input {
  margin: 0 !important;
  width: 100%;
}

.cpl-plugin-search-go {
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 10px 20px !important;
  word-break: keep-all;
}

.cpl-paged-plugin-list-control {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-width: 2px;
  border-style: solid;
}

.cpl-paged-plugin-list-control > div {
  flex-grow: 1;
  width: 0;
  height: 100%;
}

.cpl-paged-plugin-list-control > div > button {
  width: 100%;
  height: 100%;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
}

.cpl-paged-plugin-list-control > div > button:hover {
  backdrop-filter: contrast(0.75);
}

.cpl-paged-plugin-list-control > span {
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  user-select: none;
}

.cpl-banner-container {
  padding: 26px 16px;
  display: inline-block;
  width: 100%;
}

.cpl-banner-title {
  font-size: 24px;
  line-height: 1em;
  font-weight: 750;
  user-select: none;
}

.cpl-banner-button-group {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px;
}

.cpl-banner-link,
.cpl-banner-badge {
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  border-width: 1px;
  border-style: solid;
  font-weight: 600;
  user-select: none;
  display: flex;
  align-items: center;
}

.cpl-banner-caption {
  margin-top: 10px;
  font-weight: 700;
  user-select: none;
  opacity: 0.85;
}

.cpl-banner-button-group svg {
  height: 1em;
  width: 1em;
}

.cpl-layout-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  width: 100%;
  padding: 0.5em;
}

.cpl-action-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cpl-action-button {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.cpl-action-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 2.3em;
  padding: 0 0.8em;
  border-width: 1px;
  border-style: solid;
  border-radius: 999px;
}

.cpl-action-toggle input {
  margin-right: 0.45em;
}

.cpl-action-toggle-label {
  font-size: 0.92em;
}

.cpl-action-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.3em;
  padding: 0 0.8em;
  border-radius: 999px;
  font-size: 0.9em;
  font-weight: 600;
}

.cpl-inline-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 8px 0;
  border-width: 1px;
  border-style: solid;
  border-radius: 4px;
  font-size: 0.92em;
}

.cpl-inline-status svg {
  flex: 0 0 auto;
  width: 1.1em;
  height: 1.1em;
}

.cpl-inline-status span {
  flex: 1 1 auto;
}

.cpl-inline-status-action,
.cpl-inline-status-close {
  flex: 0 0 auto;
}

.cpl-install-request-panel {
  position: relative;
  padding: 12px 14px;
  margin: 10px 0;
  border-width: 1px;
  border-style: solid;
  border-radius: 6px;
}

.cpl-install-request-panel > .cpl-inline-status-close {
  position: absolute;
  top: 8px;
  right: 8px;
}

.cpl-mirror-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.cpl-mirror-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cpl-mirror-label {
  font-weight: 500;
  font-size: 0.9em;
}

.cpl-mirror-select {
  padding: 4px 8px;
  border-width: 1px;
  border-style: solid;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cpl-mirror-status {
  white-space: nowrap;
  font-weight: 500;
  font-size: 0.85em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cpl-mirror-status-icon {
  font-size: 1.2em;
  line-height: 1;
}

.cpl-static-mirror-notice,
.cpl-static-feature-notice {
  padding: 8px 12px;
  border-width: 1px;
  border-style: solid;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 0.9em;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  animation: fade-in 0.3s ease;
}

.cpl-status-banner {
  padding: 2px 6px;
  margin: 3px 0;
  border-width: 1px;
  border-style: solid;
  border-radius: 2px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpl-status-banner-large {
  min-height: 100px;
}

.cpl-loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.cpl-inline-button-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9em;
}

.cpl-plugin-card {
  border: none;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  gap: 14px;
  align-items: stretch;
  transition: box-shadow 0.2s, border-color 0.2s;
}

/* Undo TW paragraph wrapping that breaks flex layout */
.cpl-plugin-card > p {
  display: contents;
}

.cpl-plugin-card-main {
  display: flex;
  gap: 14px;
  flex: 1;
  min-width: 0;
  align-items: flex-start;
}

.cpl-plugin-card-open-button {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  text-align: inherit;
  cursor: pointer;
}

.cpl-plugin-card-open-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.cpl-plugin-card-open-button .cpl-plugin-card-main {
  width: 100%;
}

.cpl-plugin-card-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-top: 2px;
  margin-left: auto;
}

.cpl-plugin-card-icon-wrapper {
  display: block;
  flex-shrink: 0;
}

.cpl-plugin-card-icon-frame {
  padding: 0;
  margin: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
}

.cpl-plugin-card-body {
  display: block;
  flex: 1;
  min-width: 0;
}

.cpl-plugin-card-title {
  display: block;
  padding: 0;
  margin: 0;
  font-weight: 600;
  font-size: 1.05em;
  text-align: left;
}

.cpl-plugin-detail {
  min-width: min(680px, 100%);
}

.cpl-plugin-detail-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

.cpl-plugin-detail-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
}

.cpl-plugin-detail-heading {
  min-width: 0;
}

.cpl-plugin-detail-name {
  margin: 0 0 4px 0;
  font-size: 1.25em;
  line-height: 1.25;
}

.cpl-plugin-detail-title {
  word-break: break-word;
  font-family: monospace;
  font-size: 0.9em;
}

.cpl-plugin-detail-meta {
  margin-top: 6px;
}

.cpl-plugin-detail-description {
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.cpl-plugin-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.cpl-plugin-detail-version-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cpl-plugin-detail-version-select select {
  padding: 2px 6px;
  border-radius: 4px;
  border-width: 1px;
  border-style: solid;
}

.cpl-plugin-detail-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 16px;
  margin: 14px 0;
}

.cpl-plugin-detail-fields > div {
  min-width: 0;
}

.cpl-plugin-detail-fields dt {
  font-size: 0.85em;
  margin-bottom: 3px;
}

.cpl-plugin-detail-fields dd {
  margin: 0;
  word-break: break-word;
}

.cpl-plugin-detail-section {
  margin-top: 14px;
}

.cpl-plugin-detail-tag {
  margin-right: 0;
}

.cpl-plugin-detail-code {
  max-height: none;
}

.cpl-plugin-card-description {
  display: block;
  font-size: 1em;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpl-plugin-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cpl-plugin-card-meta-text {
  font-size: 0.9em;
}

.cpl-plugin-card-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.cpl-plugin-card-status {
  margin-top: 4px;
  font-size: 0.9em;
}

.cpl-plugin-card-meta-text {
  font-size: 0.9em;
}

.cpl-delete-button {
  margin: 0.5em 0;
  padding: 4px 16px !important;
  cursor: pointer;
  border: none !important;
}

.cpl-plugin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 0;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  margin-bottom: 10px;
  align-items: center;
}

.cpl-stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cpl-stat-label,
.cpl-form-label,
.cpl-compatibility-date {
  font-size: 0.85em;
}

.cpl-rating-widget,
.cpl-changelog-section,
.cpl-compatibility-section {
  margin: 15px 0;
  padding: 12px;
  border-radius: 6px;
}

.cpl-card-heading {
  margin-top: 0;
}

.cpl-card-heading-bordered {
  margin-top: 0;
  padding-bottom: 6px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

.cpl-rating-stars {
  display: flex;
  gap: 5px;
  font-size: 1.5em;
}

.cpl-rating-star-button {
  padding: 2px;
}

.cpl-rating-toggle-button {
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.cpl-rating-toggle-button:hover,
.cpl-rating-toggle-button:focus-visible {
  box-shadow: 0 0 0 2px currentColor;
}

.cpl-status-line {
  margin-top: 8px;
  font-size: 0.85em;
}

.cpl-code-panel {
  max-height: 300px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9em;
  padding: 10px;
  border-radius: 4px;
  border-width: 1px;
  border-style: solid;
}

.cpl-compatibility-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cpl-compatibility-item {
  padding: 10px;
  border-radius: 4px;
  border-width: 1px;
  border-style: solid;
  border-left-width: 3px;
  border-left-style: solid;
}

.cpl-compatibility-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.cpl-compatibility-meta {
  font-size: 0.85em;
  margin-bottom: 4px;
}

.cpl-compatibility-pill {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 6px;
  margin: 2px;
  font-size: 0.8em;
  border-width: 1px;
  border-style: solid;
}

.cpl-compatibility-description {
  font-size: 0.85em;
  padding: 6px;
  border-radius: 3px;
  margin-top: 4px;
}

.cpl-form-section {
  margin-top: 15px;
  padding-top: 12px;
  border-top-width: 1px;
  border-top-style: solid;
}

.cpl-form-row {
  display: flex;
  gap: 10px;
}

.cpl-form-field {
  flex: 1;
}

.cpl-form-label {
  display: block;
  margin-bottom: 2px;
}

.cpl-form-input {
  width: 100%;
  padding: 4px;
  border-width: 1px;
  border-style: solid;
  border-radius: 3px;
}

.cpl-form-textarea {
  min-height: 60px;
}

.cpl-submit-button-sm {
  padding: 6px 12px;
  align-self: flex-start;
}

.cpl-modal-warning-callout {
  padding: 4px;
}

.cpl-shadow-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 6px;
  border-width: 1px;
  border-style: solid;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section toggle button (changelog, compatibility) */
.cpl-section-toggle-button {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 120ms ease, box-shadow 120ms ease;
  font-size: inherit;
}

.cpl-section-toggle-button:hover,
.cpl-section-toggle-button:focus-visible {
  box-shadow: 0 0 0 2px currentColor;
}

.cpl-section-toggle-icon {
  flex-shrink: 0;
}

.cpl-section-toggle-text {
  font-weight: 600;
}

/* Moderation actions (admin approve/reject) */
.cpl-moderation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top-width: 1px;
  border-top-style: dashed;
}

.cpl-moderation-badge {
  font-size: 0.8em;
  padding: 2px 8px;
  border-radius: 10px;
  border-width: 1px;
  border-style: solid;
}

.cpl-moderation-approve-btn {
  padding: 4px 12px;
  font-size: 0.8em;
}

.cpl-moderation-reject-btn {
  padding: 4px 12px;
  font-size: 0.8em;
}