/**
 * Clevera AI — light layout helpers on top of WordPress core (.card, .notice, .form-table).
 *
 * @since 1.0.0
 */

/* Slightly wider than default .card (520px) so form-table rows read comfortably */
.clevera-ai-settings .clevera-ai-settings__card {
  max-width: 720px;
}

/* Lead text: full width, consistent rhythm under the card title */
.clevera-ai-settings .clevera-ai-settings__lead {
  margin-top: 0;
  margin-bottom: 16px;
  max-width: none;
  font-size: 14px;
  line-height: 1.6;
}

/* Notices sit flush with card padding (core notices default to negative horizontal margin) */
.clevera-ai-settings .clevera-ai-settings__card > .notice {
  margin: 0 0 16px;
  box-shadow: none;
}

.clevera-ai-settings .clevera-ai-settings__consent {
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  background: #f6f7f7;
}

.clevera-ai-settings .clevera-ai-settings__consent h3 {
  margin: 0 0 10px;
}

.clevera-ai-settings .clevera-ai-settings__consent p,
.clevera-ai-settings .clevera-ai-settings__consent ul {
  margin: 0 0 12px;
}

.clevera-ai-settings .clevera-ai-settings__consent ul {
  padding-left: 18px;
  list-style: disc;
}

.clevera-ai-settings .clevera-ai-settings__consent-check {
  margin-bottom: 0;
}

.clevera-ai-settings .clevera-ai-settings__consent-check label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.clevera-ai-settings
  .clevera-ai-settings__consent-check
  input[type="checkbox"] {
  margin-top: 4px;
}

.clevera-ai-settings .clevera-ai-settings__connect-submit {
  margin-bottom: 0;
}

.clevera-ai-settings .clevera-ai-settings__connect-btn.is-disabled,
.clevera-ai-settings .clevera-ai-settings__connect-btn.is-disabled:hover,
.clevera-ai-settings .clevera-ai-settings__connect-btn.is-disabled:focus {
  pointer-events: auto;
  opacity: 0.6;
  cursor: not-allowed;
}

/* Tighter table spacing inside the card */
.clevera-ai-settings .clevera-ai-settings__card .form-table {
  margin-top: 0;
}

.clevera-ai-settings .clevera-ai-settings__card .form-table th {
  width: 180px;
  padding-left: 0;
}

.clevera-ai-settings .clevera-ai-settings__card .form-table td {
  padding-left: 24px;
}

/* Action row: space between secondary test and red disconnect button */
.clevera-ai-settings
  .clevera-ai-settings__card
  .submit
  .button-secondary
  + .clevera-ai-settings__disconnect-btn {
  margin-left: 8px;
}

/*
 * Destructive button — same red as core .button-link-delete / submitdelete (#b32d2e).
 */
.clevera-ai-settings .clevera-ai-settings__disconnect-btn {
  color: #fff !important;
  background: #b32d2e !important;
  border-color: #b32d2e !important;
  box-shadow: none !important;
}

.clevera-ai-settings .clevera-ai-settings__disconnect-btn:hover:not(:disabled),
.clevera-ai-settings .clevera-ai-settings__disconnect-btn:focus:not(:disabled) {
  color: #fff !important;
  background: #a00 !important;
  border-color: #a00 !important;
}

.clevera-ai-settings .clevera-ai-settings__disconnect-btn:focus:not(:disabled) {
  box-shadow:
    0 0 0 1px #fff,
    0 0 0 3px #b32d2e !important;
}

.clevera-ai-settings .clevera-ai-settings__disconnect-btn:disabled {
  opacity: 0.65;
}

/* AJAX feedback notice below actions */
.clevera-ai-settings #clevera-ai-action-notice {
  margin-top: 12px;
}
