/**
 * @file
 * Entity Builder admin styles.
 */

/* Status badges following core pattern */
.eb-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.85em;
  font-weight: 500;
}

.eb-status-badge.admin-enabled {
  background-color: #d4edda;
  color: #155724;
}

.eb-status-badge.admin-missing {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffc107;
}

.eb-status-badge.admin-required {
  background-color: #fff3cd;
  color: #856404;
}

/* Definition rows based on status */
.eb-definition-draft {
  opacity: 0.85;
}

.eb-definition-outdated {
  background-color: #fffbe6;
}

/* Filter container - enhanced visibility without JS */
.table-filter {
  margin-bottom: 1em;
  padding: 0.5em 0;
}

.table-filter input[type="search"] {
  width: 100%;
  max-width: 400px;
  padding: 8px 12px;
  border: 1px solid #bbb;
  border-radius: 4px;
}

.table-filter input[type="search"]:focus {
  border-color: #0074bd;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 116, 189, 0.2);
}

/* Definition header section */
.eb-definition-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5em;
  padding-bottom: 1em;
  border-bottom: 1px solid #ddd;
}

.eb-definition-status {
  flex: 1;
}

.eb-definition-actions {
  display: flex;
  gap: 0.5em;
}

.eb-definition-description {
  margin-bottom: 1.5em;
  padding: 1em;
  background-color: #f5f5f5;
  border-left: 3px solid #0074bd;
}

/* Back link */
.eb-back-link {
  display: inline-block;
  margin-top: 1.5em;
  padding: 0.5em 1em;
}

/* Warning text for critical information (e.g., "Never applied") */
.eb-warning-text {
  color: #a51b00;
  font-weight: 600;
}

.eb-warning-text::before {
  content: '⚠ ';
}

/* Summary statistics cards */
.eb-summary-cards {
  display: flex;
  gap: 1em;
  margin-bottom: 1.5em;
  flex-wrap: wrap;
}

.eb-summary-card {
  flex: 1;
  min-width: 120px;
  max-width: 180px;
  padding: 1em;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  text-align: center;
}

.eb-summary-card__count {
  display: block;
  font-size: 2em;
  font-weight: 700;
  line-height: 1;
  color: #0074bd;
}

.eb-summary-card__label {
  display: block;
  margin-top: 0.5em;
  font-size: 0.85em;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive summary cards */
@media (max-width: 600px) {
  .eb-summary-cards {
    flex-direction: column;
  }

  .eb-summary-card {
    max-width: none;
  }
}

/* Compatibility matrix */
.eb-compatibility-table td {
  vertical-align: top;
}

.eb-compatibility-table .item-list__comma-list {
  display: inline;
}

/* Discovery grouping */
.eb-discovery-module-group {
  margin-top: 1.5em;
}

.eb-discovery-module-group h4 {
  margin-bottom: 0.5em;
  color: #666;
  font-size: 0.9em;
  text-transform: uppercase;
}

/* Responsive priority hiding handled by core */

/* Rollback list styles */
.eb-rollback-summary {
  margin-bottom: 1.5em;
  padding: 1em;
  background-color: #f5f5f5;
  border-left: 3px solid #0074bd;
}

.eb-bulk-actions {
  display: flex;
  align-items: center;
  gap: 1em;
  margin-bottom: 1em;
  padding: 0.75em 1em;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.eb-bulk-actions select {
  min-width: 220px;
  padding: 0.5em;
}

.eb-rollback-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}

.eb-rollback-table th {
  background-color: #f1f3f5;
  font-weight: 600;
  text-align: left;
  padding: 0.75em 0.6em;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
  font-size: 1em;
}

.eb-rollback-table td {
  padding: 0.4em 0.6em;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.eb-rollback-table tr:hover td {
  background-color: #f8f9fa;
}

.eb-rollback-table .eb-col-select {
  width: 30px;
  text-align: center;
}

.eb-rollback-table .eb-col-operation {
  width: 90px;
}

.eb-rollback-table .eb-col-target {
  min-width: 160px;
}

.eb-rollback-table .eb-col-dependencies {
  width: 100px;
}

.eb-rollback-table .eb-col-status {
  width: 80px;
}

.eb-rollback-table .eb-col-created {
  width: 120px;
}

.eb-rollback-table .eb-col-actions {
  width: 80px;
}

/* Target info styling */
.eb-target-info .eb-target-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.eb-target-info .eb-target-list li {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.eb-target-meta {
  display: block;
  font-size: 0.8em;
  color: #6c757d;
}

/* Dependencies styling */
.eb-no-deps {
  color: #999;
  font-style: italic;
}

.eb-has-deps {
  display: inline-block;
  padding: 2px 8px;
  background-color: #fff3cd;
  border-radius: 3px;
  font-size: 0.85em;
  color: #856404;
  cursor: help;
}

/* Row actions as list */
.eb-row-actions {
  margin: 0;
  padding: 0;
  list-style: none;
}

.eb-row-actions li {
  margin: 0;
  padding: 0;
  line-height: 1.2;
}

.eb-action-link {
  white-space: nowrap;
  font-size: 0.85em;
}

.eb-action-execute {
  font-weight: 600;
  color: #0074bd;
}

.eb-action-execute:hover {
  color: #005a94;
}

.eb-action-delete {
  color: #a51b00;
}

.eb-action-delete:hover {
  color: #7a1400;
}

/* Field type icon display */
.eb-field-type {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.eb-field-type__icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

.eb-field-type__label {
  white-space: nowrap;
}
