/* Keep this light; we’re reusing your global admin style */
.wordai-agent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}

.wordai-agent-card.card {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.wordai-agent-banner p { margin: 1em 0; }

/* Progress */
.wa-progress {
  position: relative;
  height: 14px;
  background: #eef3f7;
  border: 1px solid #d7e2ec;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 10px;
}
.wa-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0073aa, #2296e3);
  transition: width .25s ease;
}
.wa-progress-label {
  position: absolute;
  top: -24px;
  right: 0;
  font-size: 12px;
  color: #1d2327;
}

/* Stats */
.wa-stats {
  margin: 0;
  padding-left: 16px;
  line-height: 1.9;
}
/* disabled look - match WP admin a bit */
#wa-estimate[disabled],
#wa-start-indexing[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* loading state for start button */
.wa-btn-loading {
  position: relative;
  padding-left: 30px !important;
}

/* simple spinner on the left */
.wa-btn-loading::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  animation: wa-rotate 0.7s linear infinite;
}

@keyframes wa-rotate {
  to {
    transform: rotate(360deg);
  }
}
/* ------------------------------------------------------------
 * WordAI Agent Admin Styles
 * Button loading, spinner, and progress feedback
 * ------------------------------------------------------------ */

/* Disabled buttons */
#wa-estimate[disabled],
#wa-start-indexing[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Add spinner inside Start button */
.wa-btn-loading {
  position: relative;
  padding-left: 28px !important;
}

/* Spinner animation */
.wa-btn-loading::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  animation: wa-rotate 0.8s linear infinite;
}

@keyframes wa-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* Smooth progress bar transition */
.wa-progress-bar {
  transition: width 0.5s ease;
}


/* ============================================================
 * Gutenberg-style layout for AI Agent Settings
 * ============================================================ */

/* Sticky Subheader */
.sc-wordai-subheader {
  position: sticky;
  top: 32px;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sc-wordai-subheader .left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
}
.sc-wordai-subheader .right .button {
  margin-left: 6px;
}

/* Grid Layout for Cards */
.sc-wordai-agent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Individual Cards */
.sc-agent-card {
  background: #fff;
  border: 1px solid #e2e4e7;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  padding: 20px 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.sc-agent-card:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.sc-agent-card h2 {
  font-size: 16px;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sc-agent-card p {
  font-size: 13px;
  color: #555;
}
.wa-checkbox-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

/* Progress Bar Styling */
.wa-progress {
  position: relative;
  height: 22px;
  background: #f1f1f1;
  border-radius: 12px;
  margin: 10px 0;
  overflow: hidden;
}
.wa-progress-bar {
  height: 100%;
  background: linear-gradient(90deg,#0073aa,#00a0d2);
  width: 0%;
  transition: width 0.5s ease;
}
.wa-progress-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  line-height: 22px;
}
/* 🔄 Mini Spinner Animation */
@keyframes scWordaiSpin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.sc-wordai-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #ccc;
  border-top: 2px solid #0073aa;
  border-radius: 50%;
  animation: scWordaiSpin 0.9s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
.sc-wordai-spinner {
  opacity: 0.9;
  transition: opacity 0.2s ease-in-out;
}

/* AI Agent settings view page card buttons alignment*/
	.wordai-card { position: relative; padding-bottom: 58px; }
	.card-actions {
		position: absolute;
		right: 16px;
		bottom: 14px;
		text-align: right;
	}
	.card-actions button i { margin-right: 5px; }
	.card-actions button span { vertical-align: middle; }
	#wa-estimate-result { margin-top: 15px !important; margin-bottom: 28px !important; }
	#wa-view-failed { position: relative; top: 2px; }

  /* ===============================================================
   Global Notice & Scrolling Feedback
   =============================================================== */
#sc-wordai-global-message {
  border-left: 4px solid #0073aa;
  border-radius: 4px;
  background: #f8f9fa;
  transition: opacity 0.25s ease;
}

/* Keep Estimate result box visually consistent */
.sc-wordai-estimate-notice {
  border-left: 4px solid #2ea2cc;
  background: #fdfdfd;
  border-radius: 4px;
  margin-top: 15px;
  margin-bottom: 25px;
  padding: 10px 12px;
}
.sc-wordai-estimate-notice p { margin: 0; }

/* ===========================================================
   WordAI Admin – Hint Box (Embedding Model Tips)
   -----------------------------------------------------------
   Used in AI Agent > Contents Embedding & Indexing page
   =========================================================== */
.sc-wordai-hint-box {
  background: #f9f9fb;
  border-left: 3px solid #0073aa;
  padding: 10px 12px;
  margin-top: 8px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: #444;
}
.sc-wordai-hint-box code {
  background: #eef3f7;
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 12px;
  color: #0073aa;
}
