/**
 * Script Manager Modal Styles
 */

.prorank-script-manager-modal {
  max-width: 800px;
}

.prorank-script-manager-modal .components-modal__content {
  padding: 0;
}

.prorank-script-manager-tabs {
  margin: 0;
}

.prorank-script-manager-tabs .components-tab-panel__tabs {
  padding: 0 24px;
  border-bottom: 1px solid #ddd;
}

.prorank-script-manager-tabs .components-tab-panel__tab-content {
  padding: 24px;
}

/* Scripts List */
.prorank-script-list {
  margin-top: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.prorank-script-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #fff;
  transition: all 0.2s ease;
}

.prorank-script-item:hover {
  border-color: var(--wp-admin-theme-color);
  box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
}

.prorank-script-info {
  flex: 1;
  min-width: 0;
}

.prorank-script-info strong {
  display: block;
  margin-bottom: 4px;
  color: #1e1e1e;
}

.prorank-script-badges {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.prorank-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 2px;
  text-transform: uppercase;
}

.prorank-badge--pro,
.prorank-badge--core {
  background: #f0f0f1;
  color: #50575e;
}

.prorank-badge--external {
  background: #e5f5fa;
  color: #006ba1;
}

.prorank-badge--rule {
  background: #edfaef;
  color: #00a32a;
}

.prorank-script-actions {
  margin-left: 16px;
  flex-shrink: 0;
}

/* Rules List */
.prorank-rules-list {
  max-height: 400px;
  overflow-y: auto;
}

.prorank-rule-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #fff;
}

.prorank-rule-info {
  flex: 1;
}

.prorank-rule-details {
  margin-top: 4px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.prorank-rule-action {
  display: inline-block;
  padding: 2px 8px;
  background: var(--wp-admin-theme-color);
  color: #fff;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.prorank-rule-disabled {
  color: #d63638;
  font-size: 12px;
}

.prorank-rule-conditions {
  color: #757575;
  font-size: 12px;
}

.prorank-rule-actions {
  display: flex;
  gap: 8px;
  margin-left: 16px;
}

/* Rule Editor */
.prorank-rule-editor {
  padding: 24px;
}

.prorank-rule-editor-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
}

/* Modal Footer */
.prorank-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #ddd;
  text-align: right;
}

/* Loading State */
.prorank-loading-container {
  padding: 48px;
  text-align: center;
}

.prorank-loading-container p {
  margin-top: 16px;
  color: #757575;
}

/* Responsive */
@media (width <= 600px) {
  .prorank-script-item,
  .prorank-rule-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .prorank-script-actions,
  .prorank-rule-actions {
    margin-left: 0;
    margin-top: 12px;
  }
}
