/* ==========================================================================
   ACRB ADMIN SEO & SOCIAL OPTIMIZATION (SCOPED - NO :ROOT, NO GRADIENTS)
   ========================================================================== */

.acrb-seo-wrap,
.acrb-seo-wrap *,
.acrb-seo-wrap *::before,
.acrb-seo-wrap *::after {
  box-sizing: border-box;
}

.acrb-seo-wrap {
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: #1e293b;
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   Header Topbar Banner (Solid Surface - No Gradients)
   -------------------------------------------------------------------------- */
.acrb-seo-topbar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #4f46e5;
  border-radius: 14px;
  padding: 18px 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}

.acrb-seo-topbar-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.acrb-seo-topbar-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: #eef2ff;
  color: #4f46e5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.acrb-seo-topbar-icon .dashicons {
  font-size: 22px;
  width: 22px;
  height: 22px;
}

.acrb-seo-topbar-meta h1 {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 3px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.acrb-seo-topbar-meta p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

/* SEO Score Meter */
.acrb-seo-score-meter {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.acrb-seo-score-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #059669;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.acrb-seo-score-text strong {
  display: block;
  font-size: 13px;
  color: #0f172a;
  font-weight: 700;
}

.acrb-seo-score-text span {
  font-size: 11px;
  color: #64748b;
}

/* Feedback Notice */
.acrb-seo-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Layout & Cards
   -------------------------------------------------------------------------- */
.acrb-seo-grid {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 24px;
  align-items: start;
}

.acrb-seo-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  padding: 24px;
  margin-bottom: 22px;
}

.acrb-seo-card-title {
  margin: 0 0 18px;
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 12px;
}

.acrb-seo-card-title .dashicons {
  color: #4f46e5;
  font-size: 18px;
  width: 18px;
  height: 18px;
}

.acrb-seo-form-group {
  margin-bottom: 20px;
}

.acrb-seo-form-group:last-child {
  margin-bottom: 0;
}

.acrb-seo-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.acrb-seo-label {
  font-weight: 700;
  color: #1e293b;
  font-size: 13.5px;
}

.acrb-seo-counter {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
}

.acrb-seo-counter.limit-good {
  color: #059669;
}

.acrb-seo-counter.limit-warn {
  color: #d97706;
}

.acrb-seo-counter.limit-bad {
  color: #dc2626;
}

/* --------------------------------------------------------------------------
   Form Inputs & Dropdowns
   -------------------------------------------------------------------------- */
.acrb-seo-input,
.acrb-seo-textarea,
.acrb-seo-select {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  font-size: 13.5px !important;
  font-family: inherit !important;
  color: #1e293b !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
}

.acrb-seo-input,
.acrb-seo-select {
  height: 42px !important;
  line-height: 40px !important;
}

.acrb-seo-textarea {
  height: auto !important;
  padding: 10px 14px !important;
  line-height: 1.5 !important;
  resize: vertical;
}

.acrb-seo-input:hover,
.acrb-seo-textarea:hover,
.acrb-seo-select:hover {
  border-color: #94a3b8 !important;
  background: #ffffff !important;
}

.acrb-seo-input:focus,
.acrb-seo-textarea:focus,
.acrb-seo-select:focus {
  background: #ffffff !important;
  border-color: #4f46e5 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12) !important;
}

.acrb-seo-select-wrap {
  position: relative;
  width: 100%;
}

.acrb-seo-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px !important;
  cursor: pointer;
}

.acrb-seo-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #64748b;
  font-size: 18px;
  width: 18px;
  height: 18px;
}

/* Token Buttons */
.acrb-seo-tokens-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.acrb-seo-token-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.acrb-seo-token-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.acrb-seo-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.acrb-seo-media-row {
  display: flex;
  gap: 8px;
}

.acrb-seo-btn-media {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  height: 42px;
}

.acrb-seo-btn-media:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* --------------------------------------------------------------------------
   Toggle Switches
   -------------------------------------------------------------------------- */
.acrb-seo-toggle-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 12px;
}

.acrb-seo-toggle-group:last-child {
  margin-bottom: 0;
}

.acrb-seo-toggle-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acrb-seo-toggle-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.acrb-seo-toggle-desc {
  font-size: 12px;
  color: #64748b;
}

.acrb-seo-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.acrb-seo-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.acrb-seo-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.25s ease;
  border-radius: 24px;
}

.acrb-seo-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.25s ease;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.acrb-seo-switch input:checked + .acrb-seo-slider {
  background-color: #4f46e5;
}

.acrb-seo-switch input:checked + .acrb-seo-slider:before {
  transform: translateX(20px);
}

/* --------------------------------------------------------------------------
   Submit Action Button
   -------------------------------------------------------------------------- */
.acrb-seo-submit-btn {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.acrb-seo-submit-btn:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Sidebar Live Preview Modules
   -------------------------------------------------------------------------- */
.acrb-seo-preview-sidebar {
  position: sticky;
  top: 40px;
}

.acrb-seo-device-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.acrb-seo-device-title {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.acrb-seo-device-toggles {
  display: flex;
  gap: 3px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
}

.acrb-seo-device-btn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.acrb-seo-device-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Google SERP Card Preview */
.acrb-google-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  transition: max-width 0.2s ease;
}

.acrb-google-box.mobile {
  max-width: 340px;
  margin: 0 auto;
}

.acrb-google-url-line {
  font-size: 12px;
  color: #202124;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.acrb-google-favicon-demo {
  width: 16px;
  height: 16px;
  background: #4f46e5;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.acrb-google-title-text {
  font-size: 17px;
  font-weight: 400;
  color: #1a0dab;
  line-height: 1.3;
  margin-bottom: 4px;
  word-break: break-word;
  cursor: pointer;
}

.acrb-google-title-text:hover {
  text-decoration: underline;
}

.acrb-google-desc-text {
  font-size: 13px;
  color: #4d5156;
  line-height: 1.45;
  margin: 0;
  word-break: break-word;
}

/* Social Card Preview */
.acrb-social-preview-box {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.acrb-social-preview-image {
  width: 100%;
  height: 180px;
  background-color: #f1f5f9;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
}

.acrb-social-preview-body {
  padding: 14px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.acrb-social-preview-domain {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}

.acrb-social-preview-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acrb-social-preview-desc {
  font-size: 12px;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .acrb-seo-grid {
    grid-template-columns: 1fr;
  }
  .acrb-seo-preview-sidebar {
    position: static;
  }
}