/* File: inc/setup-wizard-adf/assets/css/plugins.css */

:root {
  --primary:        #2d3e50;
  --primary-hover:  #2d3e50;
  --bg:             #ffffff;
  --bg-muted:       #fafafa;
  --border:         #e1e4e8;
  --text:           #333;
  --text-muted:     #666;
  --radius:         6px;
  --transition:     0.2s ease;
}

#plugins {
  padding: 1rem;
}

.license-heading h3 {
  color: #fff !important;
}


.plugins-step .demo-plugin-header{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#plugins-heading {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--text);
}

.plugins-intro {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* Bulk-select controls */
.plugins-controls {
  text-align: right;
  margin-bottom: 1rem;
}

.plugins-controls .sb-btn {
  padding: 0.4rem 0.8rem;
  margin-left: 0.5rem;
  font-size: 0.9em;
  border-radius: var(--radius);
  border: none;
  background: #ddd;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition);
}

.plugins-controls .sb-btn:hover {
  background: #ccc;
}

/* Header */
.plugin-list-header {
  display: flex;
  background: var(--bg-muted);
  border-bottom: 2px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  font-size: 0.85em;
  text-transform: uppercase;
  color: var(--text);
}

.plugin-list-header > div {
  flex: 1;
  font-weight: 600;
}

.plugin-list-header > .col-name {
  flex: 2;
}

.plugin-list-header > .col-required,
.plugin-list-header > .col-install,
.plugin-list-header > .col-install-activate,
.plugin-list-header > .col-status,
.plugin-list-header > .col-active,
.plugin-list-header > .col-version,
.plugin-list-header > .col-loading {
  flex: 0.7;
  text-align: center;
}

/* List */
.plugin-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}

.plugin-item {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  transition: background var(--transition);
}

.plugin-item:nth-child(odd) {
  background: #fcfcfc;
}

.plugin-item:nth-child(even) {
  background: #fff;
}

.plugin-item:hover {
  background: #e6f7ff;
}

.plugin-item[data-required="1"] {
  border-left: 4px solid var(--primary);
}

.plugin-item.plugin-failed {
  background: #ffe6e6;
}

/* Columns */
.plugin-item > div {
  flex: 1;
  font-size: 0.95em;
  color: var(--text);
}

.plugin-item > .col-name {
  flex: 2;
}

.plugin-item > .col-required,
.plugin-item > .col-install,
.plugin-item > .col-install-activate,
.plugin-item > .col-status,
.plugin-item > .col-active,
.plugin-item > .col-version,
.plugin-item > .col-loading {
  flex: 0.7;
  text-align: center;
}

/* Icons and inputs */
.col-required .dashicons,
.col-status .dashicons,
.col-active .dashicons {
  font-size: 1.3em;
}

.sb-wizard-content .plugin-list .dashicons-yes-alt{
  color: #46b450 !important;
}

.sb-wizard-content .plugin-list .dashicons-no-alt{
  color: #c00 !important;
}

.col-install input[type="checkbox"],
.col-install-activate input[type="checkbox"] {
  transform: scale(1.3);
  cursor: pointer;
}

.col-install input[type="checkbox"]:disabled,
.col-install-activate input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Spinner visibility */
.col-loading .spinner {
  visibility: hidden;
}

.col-loading .is-active {
  visibility: visible;
}

/* Error messages */
.install-error {
  position: absolute;
  bottom: 0.5rem;
  left: 1rem;
  right: 1rem;
  background: rgba(255, 0, 0, 0.1);
  color: #c00;
  font-size: 0.85em;
  padding: 0.25rem;
  border-radius: var(--radius);
  text-align: center;
}

/* Actions */
.plugins-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.plugins-actions .sb-btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background var(--transition);
}

.plugins-actions .sb-btn:hover:not(:disabled) {
  background: var(--primary-hover);
}

.plugins-actions .sb-btn[disabled] {
  background: #ccc;
  cursor: not-allowed;
}

.sb-btn-continue {
  display: none;
}

/* Responsive */
@media (max-width: 600px) {
  .plugin-list-header,
  .plugin-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .plugin-list-header > div,
  .plugin-item > div {
    flex: none;
    width: 100%;
    margin-bottom: 0.5rem;
    text-align: left;
  }
  .plugins-controls,
  .plugins-actions {
    display: flex;
    flex-direction: column;
  }
  .plugins-controls .sb-btn,
  .plugins-actions .sb-btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}
