/* ============================================================
   WordAI Admin Global Stylesheet
   For all WordAI Admin Pages (API, Content, Image, Key, etc.)
   ------------------------------------------------------------
   Includes:
   1. Font Definitions
   2. Icons & Branding Elements
   3. Buttons & Controls
   4. Premium Table & Layout Structure
   5. Messages & Alerts
   6. Inputs & Form Fields
   7. Generated Content Areas
   8. Animations
   9. Modern Enhancements (hover polish, slider)
   10. Dark Mode Adaptive Styling
   11. Minimal Mode Toggle
   12. Section Dividers
   ============================================================ */


/* ------------------------------------------------------------
   1️⃣ FONT DEFINITIONS
   ------------------------------------------------------------ */
@font-face {
  font-family: 'Merienda';
  src: url(../fonts/Merienda-VariableFont_wght.ttf);
}
@font-face {
  font-family: 'Monoton';
  src: url(../fonts/Monoton-Regular.ttf);
}


/* ------------------------------------------------------------
   2️⃣ ICONS & BRANDING ELEMENTS
   ------------------------------------------------------------ */
.sc-wordai-icon { margin-right: 5px; }
.boost-your-productivity-icon { color: #2271b1; }

.sc-wordai-apisettings-icon {
  margin-right: 15px;
  font-size: 30px;
  font-weight: bolder;
  margin-top: -5px;
}

.sc-wordai-apisettings-custom-icon {
  /* Previous API settings icon: images/wordai-light-48x48.svg */
  background-image: url(images/wordai-2026-icon.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: inline-block;
  width: 48px;
  height: 48px;
  border-radius: 3px;
}

.sc-wordai-metabox-button-custom-icon {
  /* Previous editor metabox button icon: images/wordai-light-20x20.svg */
  background-image: url(images/wordai-2026-menu-bright-20x20.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  vertical-align: middle;
  border-radius: 3px;
}

.sc-wordai-metabox-popup-window-title-icon {
  /* Previous modal title icon: images/wordai-light-20x20.svg */
  background-image: url(images/wordai-2026-menu-bright-20x20.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  padding-right: 0;
  vertical-align: middle;
  border-radius: 1px;
}
.sc-wordai-suggest-titles-row-icon {
  /* Previous row action icon: images/wordai-light-16x16.svg */
  background-image: url(images/wordai-2026-menu-dark-20x20.svg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  vertical-align: bottom;
  border-radius: 1px;
}

.sc-wordai-suggest-titles:hover .sc-wordai-suggest-titles-row-icon,
.sc-wordai-suggest-titles:focus .sc-wordai-suggest-titles-row-icon {
  background-image: url(images/wordai-2026-menu-bright-20x20.svg);
}

.sc-wordai-suggest-titles {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #135e96 !important;
  background: rgba(34, 113, 177, 0.08);
  border: 1px solid rgba(34, 113, 177, 0.14);
  text-decoration: none !important;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.sc-wordai-suggest-titles:hover,
.sc-wordai-suggest-titles:focus {
  color: #ffffff !important;
  background: linear-gradient(135deg, #3155b7 0%, #1989d4 100%);
  border-color: rgba(49, 85, 183, 0.4);
  box-shadow: 0 8px 18px rgba(34, 113, 177, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.row-actions .sc-wordai-suggest-titles {
  position: relative;
  top: 1px;
  vertical-align: baseline;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sc-wordai-suggest-titles-row-label {
  display: inline-flex;
  align-items: center;
}

.row-actions .sc-wordai-suggest-titles-row-icon {
  transform: translateY(1px);
}

#the-list tr:hover .row-actions .sc-wordai-suggest-titles,
#the-list tr:focus-within .row-actions .sc-wordai-suggest-titles {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.wordai-suggest-dialog-open .wp-list-table .row-actions {
  opacity: 0 !important;
  visibility: hidden !important;
}

.wordai-image-icon-wrapper-div { position: relative; }
.wordai-image-icon-wrapper-div img {
  border-radius: 5px;
  margin-right: 10px;
}

.wordai-all-page-top-label-name {
  position: absolute;
  top: 17px;
  font-size: 30px;
  font-weight: 800;
  font-family: 'Monoton', Arial, Helvetica, sans-serif;
}

.sc-wordai-settings-icon {
  font-size: 28px !important;
  font-weight: bold !important;
  padding-right: 15px;
  vertical-align: text-top;
  color: #2271b1 !important;
}

/* legacy hint text spacing kept for compatibility */
.sc-wordai-settings-text-hints { padding-top: 4%; }

.sc-wordai-apikey-require-hints {
  font-size: 16px;
  color: coral;
  font-family: 'Merienda', Arial, Helvetica, sans-serif;
  line-height: 1.7em;
}


/* ------------------------------------------------------------
   3️⃣ BUTTONS & CONTROLS
   ------------------------------------------------------------ */
button.button-primary.button-large.metabox-content-writer-btn {
  font-size: 16px !important;
  width: 100%;
}

.metabox-content-writer-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px !important;
  border-radius: 12px;
  border: 1px solid rgba(22, 104, 155, 0.35) !important;
  background: linear-gradient(135deg, #0f68a4 0%, #1989d4 100%) !important;
  box-shadow: 0 10px 24px rgba(21, 110, 169, 0.22);
  min-height: 50px !important;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.metabox-content-writer-btn:hover,
.metabox-content-writer-btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(21, 110, 169, 0.28);
  filter: saturate(1.05);
}

.metabox-content-writer-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 16px rgba(21, 110, 169, 0.2);
}

.metabox-content-writer-btn__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sc-wordai-editor-top-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  margin-left: 10px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  border-color: #0f68a4 !important;
  background: linear-gradient(135deg, #0f68a4 0%, #1989d4 100%) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 5px 14px rgba(21, 110, 169, 0.18);
}

.sc-wordai-editor-top-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.sc-wordai-editor-top-button__icon img,
.sc-wordai-editor-top-button__icon svg,
.sc-wordai-editor-top-button__icon i,
.sc-wordai-editor-top-button__icon .dashicons {
  display: block;
  width: 20px !important;
  height: 20px !important;
  max-width: 20px;
  max-height: 20px;
  font-size: 18px;
  line-height: 20px;
  object-fit: contain;
}

.sc-wordai-editor-top-button:hover,
.sc-wordai-editor-top-button:focus {
  filter: saturate(1.08);
  box-shadow: 0 7px 18px rgba(21, 110, 169, 0.24);
}

.sc-wordai-items-label {
  font-size: 14px;
  vertical-align: middle;
  font-weight: bold;
  cursor: pointer;
}


/* ------------------------------------------------------------
   4️⃣ PREMIUM TABLE & LAYOUT STRUCTURE
   (Replaces previous ridge/dashed borders with modern container)
   ------------------------------------------------------------ */
#openai-settings-div-wrapper,
#openai-content-settings-div-wrapper,
#openai-image-settings-div-wrapper,
#openai-agent-settings-wrapper,
#wordai-chat-settings-wrapper {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fb 100%);
  border: 1px solid #d0d7de;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  padding: 25px 30px;
  margin: 20px 0;
  animation: fadeSlideIn 0.6s ease both;
}

/* Headings inside wrappers */
#openai-settings-div-wrapper h3,
#openai-content-settings-div-wrapper h3,
#openai-image-settings-div-wrapper h3,
#openai-agent-settings-wrapper h3,
#wordai-chat-settings-wrapper h3 {
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 15px;
  color: #1d2327;
}

/* Tables */
#openai-settings-div-wrapper table,
#openai-content-settings-div-wrapper table,
#openai-image-settings-div-wrapper table,
#openai-agent-settings-wrapper table,
#wordai-chat-settings-wrapper table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: none;
}

/* Rows */
#openai-settings-div-wrapper tr,
#openai-content-settings-div-wrapper tr,
#openai-image-settings-div-wrapper tr,
#openai-agent-settings-wrapper tr,
#wordai-chat-settings-wrapper tr {
  background: #fff;
  border-bottom: 1px solid #ebeff3; /* thin, premium divider */
  transition: background-color 0.25s ease, transform 0.2s ease;
  animation: fadeUpRow 0.5s ease both;
}
#openai-settings-div-wrapper tr:hover,
#openai-content-settings-div-wrapper tr:hover,
#openai-image-settings-div-wrapper tr:hover,
#openai-agent-settings-wrapper tr:hover,
#wordai-chat-settings-wrapper tr:hover {
  background-color: #f0f7ff;
  transform: scale(1.002);
}

/* Cells */
#openai-settings-div-wrapper td,
#openai-content-settings-div-wrapper td,
#openai-image-settings-div-wrapper td,
#openai-agent-settings-wrapper td,	
#wordai-chat-settings-wrapper td {
  padding: 18px 15px;
  vertical-align: top;
}

/* First column titles */
#openai-settings-div-wrapper td:first-child h4,
#openai-content-settings-div-wrapper td:first-child h4,
#openai-image-settings-div-wrapper td:first-child h4,
#openai-agent-settings-wrapper td:first-child h4,	
#wordai-chat-settings-wrapper td:first-child h4 {
  font-family: 'Merienda', Arial, Helvetica, sans-serif;
  font-weight: 700;
  color: #1d2327;
  margin-bottom: 6px;
}

/* First column selects */
#openai-settings-div-wrapper td:first-child select,
#openai-content-settings-div-wrapper td:first-child select,
#openai-image-settings-div-wrapper td:first-child select,
#openai-agent-settings-wrapper td:first-child select,
#wordai-chat-settings-wrapper td:first-child select,
#wa-embed-model,
#sc-wordai-ai-provider,
.sc-wordai-select-wrapper select {
  /* width: 95%; */
  /* padding: 8px 10px; */
  padding: 8px 20px;
  font-size: 14px;
  border: 1px solid #ccd0d4;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color 0.2s ease;
}
#openai-settings-div-wrapper td:first-child select:focus,
#openai-content-settings-div-wrapper td:first-child select:focus,
#openai-image-settings-div-wrapper td:first-child select:focus,
#openai-agent-settings-wrapper td:first-child select:focus,
#wordai-chat-settings-wrapper td:first-child select:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  outline: none;
}

/* Hint callouts (overrides the earlier spacing-only class) */
.sc-wordai-settings-text-hints {
  color: #50575e;
  font-size: 13.5px;
  line-height: 1.6em;
  background: #f9fafb;
  padding: 10px 14px;
  border-left: 3px solid #2271b1;
  border-radius: 6px;
  margin: 6px 0 4px 0;
  box-shadow: inset 0 0 4px rgba(34,113,177,0.08);
  transition: background 0.25s ease;
  animation: fadeSlideIn 0.6s ease both;
}
.sc-wordai-settings-text-hints:hover { background: #f2f8ff; }

/* Variant accents */
.sc-wordai-settings-text-hints.alert-success { border-left-color: #4BB543; color: #2d5c2d; }
.sc-wordai-settings-text-hints.alert-error   { border-left-color: #d63638; color: #792c2d; }
.sc-wordai-settings-text-hints.alert-warning { border-left-color: #f1b50f; color: #7a6200; }
.sc-wordai-settings-text-hints.alert-info    { border-left-color: #36BCD1; color: #185e72; }

/* Links inside hint */
.sc-wordai-settings-text-hints a {
  color: #2271b1;
  font-weight: 600;
  text-decoration: underline;
}
.sc-wordai-settings-text-hints a:hover {
  color: #1d5c8a;
  text-decoration: none;
}

/* API Key panel (kept, but modernized slightly) */
.openai-api-key-save-div-wrapper,
.google-gemini-api-key-save-div-wrapper,
.anthropic-api-key-save-div-wrapper {
  background: linear-gradient(180deg, #ffffff 0%, #f8f0ff 100%);
  border: 1px solid #d0d7de;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 3%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.openai-api-key-save-div-wrapper table,
.google-gemini-api-key-save-div-wrapper table,
.anthropic-api-key-save-div-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}

.sc-wordai-embed-key-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sc-wordai-embed-key-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1d2327;
}

.sc-wordai-embed-key-input-row input.wordai-anthropic-api-key-data {
  width: 100%;
  max-width: none;
}

.sc-wordai-embed-model-select-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.sc-wordai-embed-model-select {
  width: 100%;
  max-width: 420px;
}

.sc-wordai-embed-key-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.sc-wordai-embed-key-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #344054;
  font-weight: 500;
}

.sc-wordai-embed-key-toggle i {
  color: #2271b1;
}

.sc-wordai-agent-tabs-intro {
  width: fit-content;
  max-width: min(1160px, calc(100% - 20px));
  margin: 10px 0 16px;
  padding: 12px 16px;
  border: 1px solid #d8e1ea;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7fbff 0%, #eef7ff 52%, #f8f2ff 100%);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.sc-wordai-agent-tabs-intro-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sc-wordai-agent-tabs-intro-message .dashicons {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  font-size: 18px;
  color: #135e96;
}

.sc-wordai-agent-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 0;
  margin-bottom: 16px !important;
}

.sc-wordai-agent-nav-tabs .nav-tab {
  float: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
  border: 1px solid #d0d7de;
  border-radius: 999px;
  background: #fff;
  padding: 8px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sc-wordai-agent-nav-tabs .nav-tab.nav-tab-active {
  border-color: #2271b1;
  background: linear-gradient(135deg, #eef6ff 0%, #f8fbff 100%);
  color: #135e96;
}

.sc-wordai-agent-nav-tabs .dashicons {
  width: 18px;
  height: 18px;
  font-size: 18px;
}

.wa-chat-embedding-source-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.wa-chat-embedding-source-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  background: #fbfdff;
  margin-right: 0 !important;
}

.wa-chat-embedding-source-option:hover {
  border-color: #9ec5e7;
  background: #f4f9ff;
}

.wa-chat-embedding-source-option input[type="radio"] {
  margin: 0;
  flex: 0 0 auto;
}

@media (max-width: 782px) {
  .sc-wordai-embed-model-select {
    max-width: none;
  }

  .sc-wordai-embed-key-actions {
    align-items: stretch;
  }

  .sc-wordai-embed-key-toggle,
  .sc-wordai-embed-key-actions .button {
    width: 100%;
    justify-content: center;
  }

  .sc-wordai-agent-nav-tabs .nav-tab {
    width: 100%;
    justify-content: center;
  }

  .wa-chat-embedding-source-fieldset {
    grid-template-columns: 1fr;
  }

  .sc-wordai-agent-tabs-intro {
    border-radius: 16px;
  }

  .sc-wordai-agent-tabs-intro-message {
    white-space: normal;
    align-items: flex-start;
  }
}

.sc-wordai-streaming-provider-hint.is-locked {
  border: 1px solid #f4d9a6;
  border-left: 4px solid #d97706;
  border-radius: 8px;
  background: #fff8e8;
  padding: 10px 12px;
}

#wordAIStreamingInput:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.ui-dialog.sc-wordai-provider-switch-dialog {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  overflow: hidden !important;
  color: #1d2327 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 14px !important;
  font-style: normal !important;
  line-height: 1.5 !important;
}

.ui-dialog.sc-wordai-provider-switch-dialog .ui-dialog-titlebar,
.sc-wordai-provider-switch-dialog .ui-dialog-titlebar {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 64px;
  background: linear-gradient(135deg, #173d7a 0%, #2563eb 55%, #0891b2 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 12px 12px 0 0 !important;
  margin: 0 !important;
  padding: 14px 64px 14px 18px !important;
  overflow: hidden !important;
}

.sc-wordai-provider-switch-dialog .ui-dialog-title {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 16px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: 0;
}

.ui-dialog.sc-wordai-provider-switch-dialog .ui-dialog-titlebar-close,
.sc-wordai-provider-switch-dialog .ui-dialog-titlebar-close {
  position: absolute !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  top: 50% !important;
  right: 14px !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.42) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  font-size: 0 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  opacity: 1 !important;
  text-indent: 0 !important;
  cursor: pointer !important;
  z-index: 100001 !important;
  overflow: hidden !important;
  transform: translateY(-50%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 8px 18px rgba(15, 23, 42, 0.2) !important;
}

.ui-dialog.sc-wordai-provider-switch-dialog .ui-dialog-titlebar-close::before,
.sc-wordai-provider-switch-dialog .ui-dialog-titlebar-close::before {
  content: "×";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  font-size: 24px;
  font-family: Arial, Helvetica, sans-serif !important;
  font-style: normal !important;
  font-weight: 900 !important;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.ui-dialog.sc-wordai-provider-switch-dialog .ui-dialog-titlebar-close .ui-icon,
.sc-wordai-provider-switch-dialog .ui-dialog-titlebar-close .ui-icon {
  display: none !important;
}

.ui-dialog.sc-wordai-provider-switch-dialog .ui-dialog-titlebar-close:hover,
.ui-dialog.sc-wordai-provider-switch-dialog .ui-dialog-titlebar-close:focus,
.sc-wordai-provider-switch-dialog .ui-dialog-titlebar-close:hover,
.sc-wordai-provider-switch-dialog .ui-dialog-titlebar-close:focus {
  background: rgba(255, 255, 255, 0.32) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  color: #ffffff !important;
  transform: translateY(-50%) scale(1.04) !important;
}

.sc-wordai-provider-switch-dialog .ui-dialog-content {
  padding: 18px !important;
  color: #1d2327 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 14px !important;
  font-style: normal !important;
  line-height: 1.5 !important;
}

.sc-wordai-provider-switch-dialog .ui-dialog-buttonpane {
  border-top: 1px solid #e7edf7 !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 10px 14px !important;
}

.sc-wordai-provider-switch-dialog .ui-dialog-buttonset {
  display: flex !important;
  float: none !important;
  align-items: center !important;
  justify-content: flex-end !important;
  width: 100% !important;
  gap: 8px;
}

.sc-wordai-provider-switch-dialog .ui-dialog-buttonpane button,
.sc-wordai-provider-switch-dialog .ui-dialog-buttonpane .button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 64px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border-radius: 6px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 14px !important;
  font-style: normal !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap;
}

.sc-wordai-provider-switch-dialog-body {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.sc-wordai-provider-modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
  border: 1px solid #dbe8fa;
  color: #1d4ed8;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.sc-wordai-provider-modal-icon img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.sc-wordai-provider-modal-icon i {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  font-family: "Font Awesome 6 Free" !important;
  font-size: 24px;
  font-style: normal !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  line-height: 1;
}

.sc-wordai-provider-modal-icon .fa-brain::before {
  content: "\f5dc" !important;
}

.sc-wordai-provider-modal-icon .fa-bolt::before {
  content: "\f0e7" !important;
}

.sc-wordai-provider-switch-dialog-body strong {
  display: block;
  color: #14213d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 15px;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 1.4;
}

.sc-wordai-provider-switch-dialog-body p {
  margin: 5px 0 0;
  color: #536274;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 13px;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 1.55;
}

/* Hover color accent for H4s */
#openai-settings-div-wrapper tr:hover td h4,
#openai-content-settings-div-wrapper tr:hover td h4,
#openai-image-settings-div-wrapper tr:hover td h4,
#openai-agent-settings-wrapper tr:hover td h4,
#wordai-chat-settings-wrapper tr:hover td h4 {
  color: #2271b1;
}


/* ------------------------------------------------------------
   5️⃣ MESSAGES & ALERTS
   ------------------------------------------------------------ */
.success-msg { color: #4BB543; font-weight: 600; }
.alert-msg   { color: cornflowerblue; font-weight: 600; }
.error-msg   { color: red; font-weight: 600; }
.alert-change { color: blueviolet; }
.warning-msg  { color: #ffc107; font-weight: 600; }
.alert-remind { color: #36BCD1; font-weight: bold; }
.alert-success { color: #4BB543; }
.alert-error { color: red; }

.wordai-api-key-save-feedback-msg-td {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  transition: opacity 0.5s ease;
  text-align: center ! important;
  padding-bottom: 15px;
}


/* ------------------------------------------------------------
   6️⃣ INPUTS & FORM FIELDS (incl. range)
   ------------------------------------------------------------ */
input.wordai-api-key-data,
input.wordai-openai-api-key-data,
input.wordai-google-gemini-api-key-data,
input.wordai-anthropic-api-key-data,
input.wordai-xai-api-key-data {
  height: 50px !important;
  width: 100%;
  font-size: 16px;
}

.api-key-label-td {
  font-size: 14px;
  font-weight: 600;
  width: 20%;
  font-family: 'Merienda', Arial, Helvetica, sans-serif;
}

.api-key-input-data-td { width: 70%; }
.wordai-google-gemini-api-key-show-td,
.wordai-openai-api-key-show-td,
.wordai-anthropic-api-key-show-td,
.wordai-xai-api-key-show-td { width: 8%; padding-left: 2%;}
.sc-wordai-save-apikey-submit-btn-td {
  text-align: center;
  width: 8%;
}
.sc-wordai-save-apikey-submit-btn {
  padding: 8px 15px !important;
  font-size: 16px !important;
  font-weight: bold;
}


#openai-content-settings-div-wrapper select { width: 90%; }
input.scwordai-prompt { min-width: 750px; min-height: 50px; }

#openai-image-settings-div-wrapper select {
  min-height: 42px;
  width: 90%;
  max-width: 560px;
}

/* Generic fields */
input[type="text"],
input[type="number"],
select,
textarea {
  border: 1px solid #c3c4c7;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  background-color: #fff;
  color: #1d2327;
}
input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34,113,177,0.2);
  outline: none;
}

/* Range (with CSS var fallback) */
input[type="range"] {
  width: 80%;
  height: 6px;
  border-radius: 4px;
  background: #ddd; /* default; JS enhances to gradient */
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
/* WebKit thumb */
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2271b1;
  cursor: pointer;
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
  transition: transform 0.2s, background-color 0.2s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  background-color: #1d5c8a;
  transform: scale(1.1);
}
/* Firefox fills */
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #2271b1; cursor: pointer;
}
input[type="range"]::-moz-range-progress {
  background-color: #2271b1; height: 6px; border-radius: 4px;
}
input[type="range"]::-moz-range-track {
  background-color: #ddd; height: 6px; border-radius: 4px;
}
/* IE/Edge legacy fallback */
input[type="range"]::-ms-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #2271b1;
}
input[type="range"]::-ms-fill-lower { background-color: #2271b1; border-radius: 4px; }
input[type="range"]::-ms-fill-upper { background-color: #ddd; border-radius: 4px; }

/* Tiny value pill (your existing readout) */
.range-selected-value {
  font-size: 16px;
  text-align: center;
  font-weight: bold;
  background-color: honeydew;
  width: 50px;
  margin: 0 auto;
  border-radius: 40%;
  padding: 5px;
}


/* ------------------------------------------------------------
   7️⃣ GENERATED CONTENT AREAS
   ------------------------------------------------------------ */
.sc-wordai-generated-title,
.sc-wordai-generated-tags,
.sc-wordai-generated-seo-title,
.sc-wordai-generated-seo-meta-description,
.sc-wordai-generated-seo-meta-focus-keyword {
  min-width: 750px;
  font-size: 16px;
  background-color: #fff;
  color: #000;
}
.sc-wordai-generated-content {
  min-width: 750px; min-height: 350px;
  font-size: 16px; background-color: #fff; color: #000;
}
.sc-wordai-generated-excerpt {
  min-width: 750px; 
  /* min-height: 200px; */
  font-size: 16px; background-color: #fff; color: #000;
}
.update-suggested-title-msg span {
  vertical-align: bottom;
  padding-left: 10px;
}
.sc-wordai-generated-image-wrapper {
  display: flex;
  flex-direction: row;
  margin: 0 auto;
  align-items: flex-start;
  max-width: 650px;
}
.sc-wordai-generated-image-wrapper img {
  max-width: 150px; max-height: 150px;
  margin-right: 10px;
  border-radius: 5px;
  box-shadow: rgba(0,0,0,0.35) 0 5px 15px;
}


/* ------------------------------------------------------------
   8️⃣ ANIMATIONS (subtle)
   ------------------------------------------------------------ */
@keyframes fadeUpRow {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Accessibility: respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}


/* ------------------------------------------------------------
   9️⃣ MODERN ENHANCEMENTS (hover polish, buttons)
   ------------------------------------------------------------ */
#openai-settings-div-wrapper table tr,
#openai-content-settings-div-wrapper table tr,
#openai-image-settings-div-wrapper table tr,
.openai-api-key-save-div-wrapper table tr,
.google-gemini-api-key-save-div-wrapper table tr,
.anthropic-api-key-save-div-wrapper table tr,
#openai-agent-settings-wrapper table tr,
#wordai-chat-settings-wrapper table tr {
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
#openai-settings-div-wrapper table tr:hover,
#openai-content-settings-div-wrapper table tr:hover,
#openai-image-settings-div-wrapper table tr:hover,
.openai-api-key-save-div-wrapper table tr:hover,
.google-gemini-api-key-save-div-wrapper table tr:hover,
.anthropic-api-key-save-div-wrapper table tr:hover,
#openai-agent-settings-wrapper table tr:hover,
#wordai-chat-settings-wrapper table tr:hover {
  background-color: #f6faff;
  box-shadow: inset 0 0 6px rgba(34,113,177,0.15);
}

/* Buttons (primary/secondary) */
button.button-primary,
button.button-secondary {
  padding: 8px 18px !important;
  font-size: 15px !important;
  font-weight: 600;
  border-radius: 6px;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s;
}
button.button-primary {
  background-color: #2271b1 !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(34,113,177,0.3);
}
button.button-primary:hover {
  background-color: #1d5c8a !important;
  box-shadow: 0 3px 8px rgba(34,113,177,0.45);
  transform: translateY(-1px);
}
button.button-secondary {
  background-color: #f6f7f7 !important;
  color: #1d2327 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
button.button-secondary:hover {
  background-color: #e9f0f8 !important;
  box-shadow: 0 3px 6px rgba(34,113,177,0.3);
  transform: translateY(-1px);
}


/* ------------------------------------------------------------
   🔟 DARK MODE ADAPTIVE STYLING
   (WordPress admin adds body.is-dark-theme)
   ------------------------------------------------------------ */
body.is-dark-theme,
.wp-admin.is-dark-theme {
  --panel: #2c3338;
  --border: #444;
  --accent: #3398db;
  --text: #e0e0e0;
  --muted: #aaaaaa;
}

body.is-dark-theme #openai-settings-div-wrapper,
body.is-dark-theme #openai-content-settings-div-wrapper,
body.is-dark-theme #openai-image-settings-div-wrapper,
body.is-dark-theme .openai-api-key-save-div-wrapper,
body.is-dark-theme .google-gemini-api-key-save-div-wrapper,
body.is-dark-theme .anthropic-api-key-save-div-wrapper,
body.is-dark-theme #openai-agent-settings-wrapper,
body.is-dark-theme #wordai-chat-settings-wrapper {
  background: var(--panel);
  border-color: var(--border);
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

body.is-dark-theme tr { border-color: var(--border); }
body.is-dark-theme tr:hover {
  background-color: #283038;
  box-shadow: inset 0 0 5px rgba(51,152,219,0.25);
}

body.is-dark-theme h3,
body.is-dark-theme h4,
body.is-dark-theme td,
body.is-dark-theme th,
body.is-dark-theme p,
body.is-dark-theme small,
body.is-dark-theme label {
  color: var(--text) !important;
}

body.is-dark-theme input,
body.is-dark-theme select,
body.is-dark-theme textarea {
  background-color: #181d20;
  border: 1px solid var(--border);
  color: var(--text);
}
body.is-dark-theme input:focus,
body.is-dark-theme select:focus,
body.is-dark-theme textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(51,152,219,0.25);
}

/* Range in dark */
body.is-dark-theme input[type="range"] {
  background: #555; /* Firefox/Legacy base */
}
body.is-dark-theme input[type="range"]::-webkit-slider-thumb,
body.is-dark-theme input[type="range"]::-moz-range-thumb {
  background-color: #3398db;
}
body.is-dark-theme input[type="range"]::-moz-range-progress,
body.is-dark-theme input[type="range"]::-ms-fill-lower {
  background-color: #3398db;
}

/* Message colors in dark */
body.is-dark-theme .success-msg { color: #5cff9d; }
body.is-dark-theme .alert-msg   { color: #6ab8ff; }
body.is-dark-theme .error-msg   { color: #ff7676; }
body.is-dark-theme .warning-msg { color: #ffcd58; }
body.is-dark-theme .sc-wordai-apikey-require-hints { color: #ffa57f; }
body.is-dark-theme .range-selected-value {
  background-color: #333b40;
  color: var(--text);
}


/* ------------------------------------------------------------
   1️⃣1️⃣ MINIMAL MODE TOGGLE & HELP HINT STYLING
   ------------------------------------------------------------ */
.sc-wordai-compact-toggle {
  text-align: right;
  margin: -10px 10px 10px 0;
  font-weight: 600;
  color: #2271b1;
  user-select: none;
}
.sc-wordai-compact-toggle input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 6px;
  cursor: pointer;
  accent-color: #2271b1;
}

.sc-wordai-settings-text-hints {
  position: relative;
  padding: 10px 14px;
  margin-top: 10px;
  border-left: 3px solid #2271b1;
  background-color: #f9fbff;
  border-radius: 4px;
  line-height: 1.6em;
  font-size: 14px;
  color: #1d2327;
  box-shadow: 0 0 4px rgba(34,113,177,0.08);
}
.sc-wordai-settings-text-hints::before {
  content: "💡 ";
  font-weight: bold;
  color: #2271b1;
}

/* Collapse hints in minimal mode */
body.sc-wordai-minimal-mode .sc-wordai-settings-text-hints {
  max-height: 0;
  opacity: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: none;
  box-shadow: none;
  transition: all 0.3s ease-in-out;
}

/* Dark mode for hints/toggle */
body.is-dark-theme .sc-wordai-settings-text-hints {
  background-color: #2c3338;
  border-left-color: #3398db;
  color: #e0e0e0;
  box-shadow: 0 0 6px rgba(51,152,219,0.2);
}
body.is-dark-theme .sc-wordai-settings-text-hints::before { color: #3398db; }
body.is-dark-theme .sc-wordai-compact-toggle { color: #3398db; }
body.is-dark-theme.sc-wordai-minimal-mode .sc-wordai-settings-text-hints {
  background: transparent;
  box-shadow: none;
}


/* ------------------------------------------------------------
   1️⃣2️⃣ SECTION DIVIDERS (visual grouping)
   ------------------------------------------------------------ */
.wordai-section-divider {
  position: relative;
  text-align: left;
  margin: 25px 0 15px;
  padding-bottom: 4px;
  font-weight: 700;
  font-family: 'Merienda', sans-serif;
  color: #2271b1;
  animation: fadeSlideIn 0.6s ease both;
}
.wordai-section-divider::after {
  content: "";
  display: block;
  height: 2px;
  width: 100%;
  background: linear-gradient(to right, #2271b1 0%, transparent 80%);
  margin-top: 6px;
}
body.is-dark-theme .wordai-section-divider { color: #3398db; }
body.is-dark-theme .wordai-section-divider::after {
  background: linear-gradient(to right, #3398db 0%, transparent 80%);
}
.wordai-section-divider {
  margin-top: 35px;
}
.wordai-section-divider:first-of-type {
  margin-top: 10px; /* tighter on first section */
}

/* ============================================================
   💬 Global WordAI jQuery Dialog Styling – Final Contrast-Fixed
   ============================================================ */

.ui-dialog.sc-wordai-dialog-reset,
.ui-dialog.sc-wordai-dialog,
.ui-dialog {
	border: none;
	border-radius: 8px;
	box-shadow: 0 12px 28px rgba(0,0,0,0.25);
	overflow: hidden;
	font-family: "Merienda", Arial, sans-serif;
}

/* Titlebar */
.ui-dialog .ui-dialog-titlebar {
	background: linear-gradient(90deg, #0073aa, #005177);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	padding: 10px 15px;
	border: none;
}
.ui-dialog .ui-dialog-titlebar-close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 16px;
	opacity: 0.8;
}
.ui-dialog .ui-dialog-titlebar-close:hover {
	opacity: 1;
}

/* Content */
.ui-dialog .ui-dialog-content {
	padding: 18px 20px;
	background: #fff;
	color: #1d2327;
	font-size: 14px;
	line-height: 1.6em;
}

/* Buttons Area */
.ui-dialog .ui-dialog-buttonpane {
	background: #f6f7f7;
	border-top: 1px solid #ccd0d4;
	padding: 10px 15px;
	text-align: right;
}
.ui-dialog .ui-dialog-buttonpane button {
	border-radius: 5px;
	padding: 7px 18px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(0,0,0,0.1);
	transition: all 0.25s ease;
}

/* ✅ Primary (Yes, Reset) — vivid blue with white text */
.ui-dialog .ui-dialog-buttonpane button:first-child {
	background: linear-gradient(180deg, #0073aa 0%, #005f8a 100%);
	color: #ffffff;                    /* Bright white text */
	text-shadow: 0 1px 2px rgba(0,0,0,0.25); /* Adds clarity on grayish screens */
}
.ui-dialog .ui-dialog-buttonpane button:first-child:hover {
	background: linear-gradient(180deg, #00639a 0%, #004d78 100%);
	color: #ffffff;
	box-shadow: 0 3px 6px rgba(0,0,0,0.25);
	transform: translateY(-1px);
}

/* ⚪ Secondary (Cancel) */
.ui-dialog .ui-dialog-buttonpane button:last-child {
	background-color: #e2e4e7;
	color: #1d2327;
	border: 1px solid #ccd0d4;
}
.ui-dialog .ui-dialog-buttonpane button:last-child:hover {
	background-color: #d7d9dc;
	color: #000;
}

/* Dark Mode */
body.is-dark-theme .ui-dialog .ui-dialog-titlebar {
	background: linear-gradient(90deg, #3398db, #1a5d8f);
}
body.is-dark-theme .ui-dialog .ui-dialog-content {
	background: #22272b;
	color: #e0e0e0;
}
body.is-dark-theme .ui-dialog .ui-dialog-buttonpane {
	background: #2c3338;
	border-top: 1px solid #444;
}
body.is-dark-theme .ui-dialog .ui-dialog-buttonpane button:first-child {
	background: linear-gradient(180deg, #3398db 0%, #1a6fa8 100%);
	color: #ffffff;
	text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
body.is-dark-theme .ui-dialog .ui-dialog-buttonpane button:last-child {
	background-color: #3a4248;
	color: #e0e0e0;
}
/* Highlight dialog top border based on tone */
.ui-dialog.sc-wordai-dialog .ui-dialog-titlebar {
	border-top: 4px solid var(--sc-wordai-dialog-accent, #0073aa);
}
.ui-dialog.sc-wordai-dialog.warning .ui-dialog-titlebar {
	--sc-wordai-dialog-accent: #dba617;
}
.ui-dialog.sc-wordai-dialog.error .ui-dialog-titlebar {
	--sc-wordai-dialog-accent: #d63638;
}
.ui-dialog.sc-wordai-dialog.success .ui-dialog-titlebar {
	--sc-wordai-dialog-accent: #00a32a;
}
.ui-dialog.sc-wordai-dialog.warning .ui-dialog-titlebar {
	border-top: 4px solid #dba617;
}

/* ============================================================
   💎 WordAI Scoped Global Modal Styling
   Safe within .sc-wordai-global-dialog only
   ============================================================ */

/* ============================================================
   🎯 Modal Buttons + Select Uniform Sizing & Alignment
   ============================================================ */

/* Shared sizing for buttons and select */
.sc-wordai-global-dialog button.button,
.sc-wordai-global-dialog select#scwordai-suggested-titles-number {
	height: 50px;
	line-height: 48px;
	font-size: 15px;
	vertical-align: middle;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Select box aligned with button height and limited width */
.sc-wordai-global-dialog select#scwordai-suggested-titles-number {
	max-width: 100px;
	min-width: 80px;
	border-radius: 6px;
	border: 1px solid #ccd0d4;
	background-color: #fff;
	color: #1d2327;
	padding: 0 10px;
	cursor: pointer;
	transition: all 0.2s ease;
}
.sc-wordai-global-dialog select#scwordai-suggested-titles-number:hover,
.sc-wordai-global-dialog select#scwordai-suggested-titles-number:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px rgba(34,113,177,0.25);
	outline: none;
}

/* Buttons next to selects */
.sc-wordai-global-dialog button.button + select#scwordai-suggested-titles-number,
.sc-wordai-global-dialog select#scwordai-suggested-titles-number + button.button {
	margin-left: 10px;
}

/* Vertically centered button icons */
.sc-wordai-global-dialog button.button i,
.sc-wordai-global-dialog button.button svg {
	font-size: 17px;
	margin-right: 6px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transform: translateY(1px); /* subtle optical balance */
}

/* Prevent text shifting if no icon */
.sc-wordai-global-dialog button.button span {
	display: inline-flex;
	align-items: center;
}

/* Optional subtle press-down effect */
.sc-wordai-global-dialog button.button:active {
	transform: translateY(1px);
}

/* Prevent conflicts — only style our dialogs */
.ui-dialog.sc-wordai-global-dialog {
	border: none;
	border-radius: 10px;
	box-shadow: 0 12px 28px rgba(0,0,0,0.25);
	overflow: hidden;
	font-family: "Merienda", Arial, sans-serif;
}

/* Titlebar */
.ui-dialog.sc-wordai-global-dialog .ui-dialog-titlebar {
	background: linear-gradient(135deg, #0073aa 0%, #2296e3 100%);
	color: #fff !important;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 0 48px 0 16px;
	min-height: 52px;
	border: none !important;
	border-radius: 8px 8px 0 0;
	box-sizing: border-box;
  position: relative;
}

/* Title text + icon */
.ui-dialog.sc-wordai-global-dialog .ui-dialog-title {
	display: flex;
	align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex: 1 1 auto;
  width: auto !important;
  max-width: calc(100% - 48px);
	font-weight: 700;
	font-size: 16px;
	line-height: 1.3;
	color: #fff;
	margin: 0;
  padding: 0;
}
.ui-dialog.sc-wordai-global-dialog .ui-dialog-title i,
.ui-dialog.sc-wordai-global-dialog .ui-dialog-title svg {
	margin-right: 0;
	font-size: 18px;
	color: #fff;
}

.ui-dialog.sc-wordai-content-dialog .ui-dialog-title {
  max-width: calc(100% - 200px);
}

.ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress {
  position: absolute;
  right: 54px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 104px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

.ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress-wave {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  height: 12px;
  flex: 0 0 auto;
}

.ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress-wave span {
  width: 3px;
  height: 9px;
  border-radius: 999px;
  background: #fff;
  opacity: 0.88;
  animation: wordaiTitlebarWave 0.85s ease-in-out infinite;
  transform-origin: center bottom;
}

.ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress-wave span:nth-child(2) { animation-delay: 0.08s; }
.ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress-wave span:nth-child(3) { animation-delay: 0.16s; }
.ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress-wave span:nth-child(4) { animation-delay: 0.24s; }
.ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress-wave span:nth-child(5) { animation-delay: 0.32s; }

.ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress-label {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
}

@keyframes wordaiTitlebarWave {
  0%, 100% { transform: scaleY(0.45); opacity: 0.62; }
  50% { transform: scaleY(1); opacity: 1; }
}

.ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress.is-loading {
  background: #d97706;
  color: #fff;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.28);
}

.ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress.is-complete {
  background: #16803a;
  color: #fff;
  box-shadow: 0 8px 18px rgba(22, 128, 58, 0.24);
}

/* Close button */
.ui-dialog.sc-wordai-global-dialog .ui-dialog-titlebar-close {
	position: absolute !important;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent !important;
	border: none !important;
	color: #fff !important;
	font-weight: 900 !important;
	font-size: 22px !important;
	width: 32px;
	height: 32px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	line-height: 1;
	cursor: pointer;
	z-index: 100000;
	opacity: 1 !important;
	transition: all 0.25s ease-in-out;
}
.ui-dialog.sc-wordai-global-dialog .ui-dialog-titlebar-close::before {
	content: "✕";
	display: inline-block;
	color: inherit;
	font-weight: 800;
	font-size: 22px;
	line-height: 1;
}
.ui-dialog.sc-wordai-global-dialog .ui-dialog-titlebar-close span.ui-icon {
	width: 18px;
  height: 18px;
  top: 70%;
}
.ui-dialog.sc-wordai-global-dialog .ui-dialog-titlebar-close:hover {
	transform: translateY(-50%) scale(1.1);
	text-shadow: 0 0 8px rgba(255,255,255,0.85);
}

/* Content area */
.ui-dialog.sc-wordai-global-dialog .ui-dialog-content {
	padding: 20px 24px;
	background: #fff;
	color: #1d2327;
	font-size: 14px;
	line-height: 1.6em;
	overflow-y: auto;
	max-height: 75vh;
}

/* Button pane */
.ui-dialog.sc-wordai-global-dialog .ui-dialog-buttonpane {
	background: #f6f7f7;
	border-top: 1px solid #ccd0d4;
	padding: 10px 15px;
	text-align: right;
}

/* Buttons inside dialog */
.ui-dialog.sc-wordai-global-dialog .ui-dialog-buttonpane button {
	border-radius: 5px;
	padding: 8px 18px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.25s ease;
}
.ui-dialog.sc-wordai-global-dialog .ui-dialog-buttonpane button:first-child {
	background: linear-gradient(135deg, #0073aa 0%, #005f8a 100%);
	color: #fff;
}
.ui-dialog.sc-wordai-global-dialog .ui-dialog-buttonpane button:first-child:hover {
	background: linear-gradient(135deg, #00639a 0%, #004d78 100%);
}
.ui-dialog.sc-wordai-global-dialog .ui-dialog-buttonpane button:last-child {
	background: #e2e4e7;
	color: #1d2327;
	border: 1px solid #ccd0d4;
}
.ui-dialog.sc-wordai-global-dialog .ui-dialog-buttonpane button:last-child:hover {
	background: #d7d9dc;
	color: #000;
}

/* Dark mode adaptation */
body.is-dark-theme .ui-dialog.sc-wordai-global-dialog .ui-dialog-titlebar {
	background: linear-gradient(135deg, #3398db 0%, #1a5d8f 100%);
}
body.is-dark-theme .ui-dialog.sc-wordai-global-dialog .ui-dialog-content {
	background: #22272b;
	color: #e0e0e0;
}
body.is-dark-theme .ui-dialog.sc-wordai-global-dialog .ui-dialog-buttonpane {
	background: #2c3338;
	border-top: 1px solid #444;
}
body.is-dark-theme .ui-dialog.sc-wordai-global-dialog .ui-dialog-buttonpane button:first-child {
	background: linear-gradient(135deg, #3398db 0%, #1a6fa8 100%);
	color: #fff;
}
body.is-dark-theme .ui-dialog.sc-wordai-global-dialog .ui-dialog-buttonpane button:last-child {
	background-color: #3a4248;
	color: #e0e0e0;
}

/* Responsive */
@media (max-width: 600px) {
	.ui-dialog.sc-wordai-global-dialog .ui-dialog-titlebar {
		font-size: 15px;
		padding: 0 40px 0 12px;
		min-height: 46px;
	}
	.ui-dialog.sc-wordai-global-dialog .ui-dialog-titlebar-close {
		right: 10px;
		font-size: 20px !important;
	}
}

/* ============================================================
   💎 WordAI Global Buttons — Primary & Secondary Enhancements
   ============================================================ */

/* 🔵 Shared button base for perfect alignment */
button.button-primary,
button.button-secondary,
.sc-wordai-global-dialog .button-primary,
.sc-wordai-global-dialog .button-secondary {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	height: 48px;
	line-height: 1 !important;
	padding: 0 22px !important;
	font-size: 15px !important;
	font-weight: 600;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	box-sizing: border-box;
	transition: all 0.25s ease;
}

/* Uniform icon styling inside buttons */
button.button-primary i,
button.button-secondary i,
.sc-wordai-global-dialog .button-primary i,
.sc-wordai-global-dialog .button-secondary i {
	font-size: 16px;
	margin-right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

/* ============================================================
   🔵 Primary Buttons (Save / Generate / Apply / Confirm / Update)
   ============================================================ */

@keyframes wordaiGlowPulse {
	0% {
		box-shadow: 0 0 6px rgba(34, 113, 177, 0.2),
		            0 0 12px rgba(34, 113, 177, 0.15);
	}
	50% {
		box-shadow: 0 0 10px rgba(34, 113, 177, 0.45),
		            0 0 20px rgba(34, 113, 177, 0.35);
	}
	100% {
		box-shadow: 0 0 6px rgba(34, 113, 177, 0.2),
		            0 0 12px rgba(34, 113, 177, 0.15);
	}
}

button.button-primary,
button.button-primary.save-license-key-btn,
button.button-primary.save-wordai-settings-btn,
button.button-primary.generate-wordai-content-btn,
button.button-primary.apply-wordai-settings-btn,
button.button-primary.confirm-wordai-action-btn,
button.button-primary.update-wordai-btn,
.sc-wordai-global-dialog .button-primary {
	background: linear-gradient(135deg, #0073aa 0%, #2296e3 100%);
	color: #fff;
	border: none;
	box-shadow: 0 4px 10px rgba(0, 115, 170, 0.25);
}

button.button-primary:hover,
button.button-primary.save-license-key-btn:hover,
button.button-primary.save-wordai-settings-btn:hover,
button.button-primary.generate-wordai-content-btn:hover,
button.button-primary.apply-wordai-settings-btn:hover,
button.button-primary.confirm-wordai-action-btn:hover,
button.button-primary.update-wordai-btn:hover,
.sc-wordai-global-dialog .button-primary:hover {
	background: linear-gradient(135deg, #2296e3 0%, #0073aa 100%);
	animation: wordaiGlowPulse 1.5s ease-in-out infinite;
	transform: translateY(-1px);
}

button.button-primary:active,
.sc-wordai-global-dialog .button-primary:active {
	transform: translateY(1px);
	animation: none;
	box-shadow: 0 2px 6px rgba(0, 115, 170, 0.25);
}

/* Dark mode adaptation */
body.is-dark-theme button.button-primary,
body.is-dark-theme .sc-wordai-global-dialog .button-primary {
	background: linear-gradient(135deg, #3398db 0%, #1a6fa8 100%);
	color: #ffffff;
}
body.is-dark-theme button.button-primary:hover,
body.is-dark-theme .sc-wordai-global-dialog .button-primary:hover {
	animation: wordaiGlowPulse 1.5s ease-in-out infinite;
	box-shadow: 0 0 12px rgba(51, 152, 219, 0.6);
}


/* ============================================================
   ⚪ Secondary Buttons (Cancel / Close / Dismiss)
   ============================================================ */

@keyframes wordaiGrayGlow {
	0% {
		box-shadow: 0 0 4px rgba(200, 200, 200, 0.2),
		            0 0 8px rgba(200, 200, 200, 0.15);
	}
	50% {
		box-shadow: 0 0 8px rgba(200, 200, 200, 0.35),
		            0 0 14px rgba(180, 180, 180, 0.25);
	}
	100% {
		box-shadow: 0 0 4px rgba(200, 200, 200, 0.2),
		            0 0 8px rgba(200, 200, 200, 0.15);
	}
}

button.button-secondary,
.sc-wordai-global-dialog .button-secondary,
button.button.cancel-wordai-btn,
button.button.close-wordai-btn,
button.button.dismiss-wordai-btn {
	background: linear-gradient(135deg, #f6f7f7 0%, #e2e4e7 100%);
	color: #1d2327;
	border: 1px solid #ccd0d4;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

button.button-secondary:hover,
.sc-wordai-global-dialog .button-secondary:hover,
button.button.cancel-wordai-btn:hover,
button.button.close-wordai-btn:hover,
button.button.dismiss-wordai-btn:hover {
	background: linear-gradient(135deg, #ffffff 0%, #e5e9ee 100%);
	animation: wordaiGrayGlow 1.8s ease-in-out infinite;
	transform: translateY(-1px);
}

button.button-secondary:active,
.sc-wordai-global-dialog .button-secondary:active {
	transform: translateY(1px);
	animation: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Dark mode for secondary buttons */
body.is-dark-theme button.button-secondary,
body.is-dark-theme .sc-wordai-global-dialog .button-secondary {
	background: linear-gradient(135deg, #3a4248 0%, #2c3338 100%);
	color: #e0e0e0;
	border: 1px solid #444;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
body.is-dark-theme button.button-secondary:hover,
body.is-dark-theme .sc-wordai-global-dialog .button-secondary:hover {
	background: linear-gradient(135deg, #434b52 0%, #3a4248 100%);
	animation: wordaiGrayGlow 1.8s ease-in-out infinite;
	box-shadow: 0 0 10px rgba(200, 200, 200, 0.25);
}
/* ============================================================
   ⚙️ Respect Inline Display Rules for Dynamic Show/Hide Buttons
   ============================================================ */

/* Ensure inline display:none or jQuery .hide() always takes effect */
button[style*="display: none"],
button[style*="display:none"],
.sc-wordai-global-dialog button[style*="display: none"],
.sc-wordai-global-dialog button[style*="display:none"],
button.hidden,
.sc-wordai-global-dialog button.hidden {
	display: none !important;
	visibility: hidden !important;
}

/* Allow jQuery .show() / fadeIn() to work naturally */
button:not([style*="display: none"]):not([style*="display:none"]),
.sc-wordai-global-dialog button:not([style*="display: none"]):not([style*="display:none"]) {
	visibility: visible;
}


/* =======================================================
   WordAI SEO MetaBox – Professional Guided Editor Styling
   ======================================================= */

/* Base Wrapper */
.wordai-seo-metabox-wrapper {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 6px;
	margin: 12px 0 18px;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header */
.wordai-seo-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #f6f7f7;
	border-bottom: 1px solid #dcdcde;
	padding: 10px 12px;
	cursor: pointer;
}
.wordai-seo-header strong {
	font-size: 14px;
	color: #1d2327;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 6px;
}
.wordai-seo-header .dashicons-chart-line {
	color: #2271b1;
	font-size: 18px;
	margin-right: 3px;
}
.wordai-seo-header .toggle-seo-panel {
	background: transparent;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	transition: transform 0.25s ease;
}
.wordai-seo-header .toggle-seo-panel[aria-expanded="false"] .dashicons-arrow-up-alt2 {
	transform: rotate(180deg);
}

/* Accordion Body */
.wordai-seo-body {
	padding: 14px 16px;
	animation: fadeIn 0.3s ease;
}
.wordai-seo-body.hidden { display: none; }

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Field Blocks */
.wordai-seo-field {
	margin-bottom: 16px;
	position: relative;
}
.wordai-seo-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	color: #1d2327;
	font-size: 13px;
}
.wordai-seo-field textarea,
.wordai-seo-field input[type="text"],
.wordai-seo-field input[type="url"],
.wordai-seo-field select {
	width: 100%;
	padding: 7px 8px;
	font-size: 13px;
	border: 1px solid #d0d1d3;
	border-radius: 4px;
	background: #fff;
	box-shadow: inset 0 1px 1px rgba(0,0,0,0.03);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wordai-seo-field input:focus,
.wordai-seo-field textarea:focus,
.wordai-seo-field select:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}
.wordai-seo-field input::placeholder,
.wordai-seo-field textarea::placeholder {
	color: #a0a5aa;
}

/* Tooltip Hint */
.wordai-seo-hint {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 4px;
	background: #f0f6fc;
	border: 1px solid #cce3f0;
	color: #0a4b78;
	font-size: 12px;
	padding: 6px 8px;
	border-radius: 4px;
	line-height: 1.4;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
	display: none;
	z-index: 99;
	width: calc(100% - 4px);
}
.wordai-seo-field:focus-within .wordai-seo-hint {
	display: block;
	animation: fadeIn 0.2s ease;
}

/* Checkbox */
.wordai-seo-checkbox {
	margin: 10px 0 8px;
	display: flex;
	align-items: center;
}
.wordai-seo-checkbox label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	color: #1d2327;
}
.wordai-seo-checkbox input[type="checkbox"] {
	accent-color: #2271b1;
	width: 16px;
	height: 16px;
	cursor: pointer;
}

/* Status Message */
.wordai-seo-meta-tags-status-msg {
	font-size: 12.5px;
	margin-top: 10px;
	padding-top: 4px;
	border-top: 1px solid #eee;
	color: #2b6a24;
	line-height: 1.5;
}
.alert-success { color: #1a7f37; font-weight: 500; }
.alert-error { color: #b52727; font-weight: 500; }

/* Responsive */
@media (max-width: 782px) {
	.wordai-seo-header strong { font-size: 13px; }
	.wordai-seo-body { padding: 12px; }
	.wordai-seo-field textarea,
	.wordai-seo-field input,
	.wordai-seo-field select { font-size: 12.5px; }
}

/* Character Counter & Rating */
.wordai-seo-counter {
	margin-top: 5px;
	font-size: 12px;
	color: #1d2327;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.wordai-seo-badge {
	display: inline-flex;
	align-items: center;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 11.5px;
	font-weight: 600;
	margin-left: 8px;
}

/* Rating Colors */
.wordai-seo-badge.good {
	background-color: #e5f5e9;
	color: #1a7f37;
	border: 1px solid #a8e0b5;
}

.wordai-seo-badge.warning {
	background-color: #fff5e5;
	color: #b86d00;
	border: 1px solid #f2d68f;
}

.wordai-seo-badge.bad {
	background-color: #fdeaea;
	color: #b52727;
	border: 1px solid #f2b4b4;
}

/* =========================================
   Google Search Preview Styling
   ========================================= */
.wordai-seo-serp-preview {
	margin-top: 18px;
	padding-top: 10px;
	border-top: 1px solid #e2e4e7;
}

.wordai-seo-serp-preview h4 {
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 5px;
}

.serp-preview-box {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 12px 14px;
	box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.serp-title {
	color: #1a0dab;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	margin-bottom: 3px;
	word-break: break-word;
}

.serp-url {
	color: #006621;
	font-size: 13px;
	margin-bottom: 4px;
	word-break: break-all;
}

.serp-description {
	color: #545454;
	font-size: 13px;
	line-height: 1.4;
	word-break: break-word;
}

/* When over limit — highlight for warning */
.serp-overlimit .serp-title,
.serp-overlimit .serp-description {
	color: #b52727 !important;
}

/* Responsive */
@media (max-width: 782px) {
	.serp-preview-box {
		padding: 10px;
	}
	.serp-title { font-size: 14px; }
	.serp-description { font-size: 12.5px; }
}
/* =========================================
   SERP Preview – View Toggle + Responsive
   ========================================= */
.serp-view-toggle {
	display: flex;
	justify-content: space-around;
	gap: 6px;
	margin-bottom: 6px;
}

.serp-view-toggle button {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	color: #1d2327;
	font-size: 12.5px;
	padding: 3px 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 4px;
	transition: all 0.2s ease;
}

.serp-view-toggle button.active {
	background: #2271b1;
	color: #fff;
	border-color: #1b4b7d;
	box-shadow: 0 0 0 1px #2271b1;
}

/* Mobile SERP Simulation */
.serp-preview-box.mobile-view {
	max-width: 360px;
	margin: 0 auto;
	border: 1px solid #d0d1d3;
	border-radius: 10px;
	padding: 10px;
	box-shadow: 0 0 6px rgba(0,0,0,0.05);
}

.serp-preview-box.mobile-view .serp-title {
	font-size: 14px;
	line-height: 1.4;
}
.serp-preview-box.mobile-view .serp-url {
	font-size: 12.5px;
}
.serp-preview-box.mobile-view .serp-description {
	font-size: 12.5px;
}

/* Adjust right padding for selects near edges */
.wordai-seo-field select,
.wordai-seo-field input,
.wordai-seo-field textarea {
	box-sizing: border-box;
	width: calc(100% - 2px);
}

/* Smooth color fade for preview updates */
.serp-preview-box {
	transition: background 0.2s ease, color 0.2s ease;
}
.wordai-seo-meta-tags-status-msg {
	margin-top: 6px;
	font-size: 13px;
}
.wordai-seo-meta-tags-status-msg .alert-success {
	color: #007cba;
	font-weight: 500;
}
.wordai-seo-meta-tags-status-msg .alert-error {
	color: #d63638;
	font-weight: 500;
}
.wordai-seo-status-notice {
	margin-top: 10px;
}

.wordai-seo-status-notice.notice-success {
	border-left-color: #46b450 !important;
}

.wordai-seo-status-notice.notice-info {
	border-left-color: #2271b1 !important;
}

/* ===== WordAI SEO Rank Styles ===== */

.wordai-seo-field-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 5px;
}

.wordai-seo-rank-circle {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #dcdcde;
	color: #1d2327;
	font-size: 10px;
	font-weight: 600;
	transition: all 0.25s ease-in-out;
}

.wordai-seo-rank-circle.good {
	background: #00a32a;
	color: #fff;
}

.wordai-seo-rank-circle.average {
	background: #ffb900;
	color: #222;
}

.wordai-seo-rank-circle.poor {
	background: #d63638;
	color: #fff;
}

.wordai-seo-char-counter {
	font-size: 11px;
	color: #50575e;
	text-align: right;
	margin-top: 2px;
}

/* Hover and focus consistency */
.wordai-seo-field textarea,
.wordai-seo-field input,
.wordai-seo-field select {
	width: 100%;
	border-radius: 4px;
	border: 1px solid #ccd0d4;
	padding: 6px 8px;
	box-sizing: border-box;
}

.wordai-seo-field textarea:focus,
.wordai-seo-field input:focus,
.wordai-seo-field select:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* Header and accordion toggle */
.wordai-seo-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 12px;
	background: #f6f7f7;
	border-bottom: 1px solid #ccd0d4;
	border-radius: 4px 4px 0 0;
}

.wordai-seo-body {
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #ccd0d4;
	border-top: none;
	border-radius: 0 0 4px 4px;
}

/* SEO toggle accordion */
.toggle-seo-panel {
	background: none;
	border: none;
	cursor: pointer;
	color: #50575e;
}
/* ============================================================
   🌗 WordAI SEO Metabox – Dark Mode Enhancements
   Improves readability, contrast, and animations in dark theme.
   Safe to append at the end of stylesheet.
   ============================================================ */

/* Pulse animation for rank circles */
@keyframes wordaiPulse {
	0%   { transform: scale(1); box-shadow: 0 0 0 rgba(34,113,177,0); }
	50%  { transform: scale(1.1); box-shadow: 0 0 10px rgba(34,113,177,0.35); }
	100% { transform: scale(1); box-shadow: 0 0 0 rgba(34,113,177,0); }
}
.wordai-seo-rank-circle.pulse {
	animation: wordaiPulse 0.6s ease;
}

/* Flash animation when SERP updates */
@keyframes wordaiFlash {
	0%   { background-color: rgba(34,113,177,0.15); }
	50%  { background-color: rgba(34,113,177,0.25); }
	100% { background-color: transparent; }
}
.flash {
	animation: wordaiFlash 0.8s ease;
}

/* Character counter state colors */
.wordai-seo-char-counter.good span.current { color: #1a7f37; font-weight: 600; }
.wordai-seo-char-counter.warning span.current { color: #b86d00; font-weight: 600; }
.wordai-seo-char-counter.danger span.current { color: #b52727; font-weight: 600; }

/* Dark Mode Overrides */
body.is-dark-theme .wordai-seo-metabox-wrapper {
	background: #1e1f21;
	border-color: #3a3b3d;
	box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
body.is-dark-theme .wordai-seo-header {
	background: #2a2d30;
	border-bottom-color: #444;
}
body.is-dark-theme .wordai-seo-field label {
	color: #e0e0e0;
}
body.is-dark-theme .wordai-seo-field textarea,
body.is-dark-theme .wordai-seo-field input,
body.is-dark-theme .wordai-seo-field select {
	background: #2a2d30;
	border-color: #444;
	color: #e0e0e0;
}
body.is-dark-theme .wordai-seo-field textarea:focus,
body.is-dark-theme .wordai-seo-field input:focus,
body.is-dark-theme .wordai-seo-field select:focus {
	border-color: #3398db;
	box-shadow: 0 0 0 1px #3398db;
}

/* SERP Preview Box */
body.is-dark-theme .serp-preview-box {
	background: #181a1c;
	border-color: #333;
	box-shadow: inset 0 0 6px rgba(0,0,0,0.4);
}
body.is-dark-theme .serp-title {
	color: #79b8ff;
}
body.is-dark-theme .serp-url {
	color: #30c08e;
}
body.is-dark-theme .serp-description {
	color: #bdbdbd;
}

/* SERP Overlimit Warning (Dark Mode) */
body.is-dark-theme .serp-overlimit .serp-title,
body.is-dark-theme .serp-overlimit .serp-description {
	color: #ff7676 !important;
}

/* Rank Circles */
body.is-dark-theme .wordai-seo-rank-circle {
	background: #3b3d41;
	color: #e0e0e0;
}
body.is-dark-theme .wordai-seo-rank-circle.good {
	background: #00b65c;
	color: #fff;
	box-shadow: 0 0 6px rgba(0,255,128,0.4);
}
body.is-dark-theme .wordai-seo-rank-circle.average {
	background: #ffb900;
	color: #222;
	box-shadow: 0 0 6px rgba(255,185,0,0.4);
}
body.is-dark-theme .wordai-seo-rank-circle.poor {
	background: #d63638;
	color: #fff;
	box-shadow: 0 0 6px rgba(214,54,56,0.4);
}

/* SERP View Toggle Buttons */
body.is-dark-theme .serp-view-toggle button {
	background: #2c2f34;
	color: #e0e0e0;
	border-color: #444;
}
body.is-dark-theme .serp-view-toggle button.active {
	background: #3398db;
	color: #fff;
	border-color: #1a5d8f;
	box-shadow: 0 0 6px rgba(51,152,219,0.6);
}

/* Checkbox + Status */
body.is-dark-theme .wordai-seo-checkbox label {
	color: #e0e0e0;
}
body.is-dark-theme .wordai-seo-meta-tags-status-msg {
	color: #b5e1ff;
}
body.is-dark-theme .alert-success {
	color: #5cff9d;
}
body.is-dark-theme .alert-error {
	color: #ff7676;
}
/* ============================================================
   🎯 WordAI SEO Rank Circle Alignment (next to labels)
   ============================================================ */

/* Container for label + badge */
.wordai-seo-field-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

/* Label styling */
.wordai-seo-field-top label {
	font-weight: 600;
	font-size: 14px;
	color: #1d2327;
	display: flex;
	align-items: center;
}

/* Rank circle aligned to right of label */
.wordai-seo-rank-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	margin-left: 10px;
	border-radius: 50%;
	font-size: 10px;
	font-weight: 600;
	background: #f3f4f6;
	color: #333;
	border: 2px solid #ccc;
	transition: all 0.25s ease;
}

/* Status colors */
.wordai-seo-rank-circle.good {
	background: #00b65c;
	color: #fff;
	border-color: #009c50;
	box-shadow: 0 0 6px rgba(0, 255, 128, 0.4);
}
.wordai-seo-rank-circle.average {
	background: #ffb900;
	color: #222;
	border-color: #d49a00;
	box-shadow: 0 0 6px rgba(255, 185, 0, 0.4);
}
.wordai-seo-rank-circle.poor {
	background: #d63638;
	color: #fff;
	border-color: #b11d1f;
	box-shadow: 0 0 6px rgba(214, 54, 56, 0.4);
}

/* Hover glow */
.wordai-seo-rank-circle:hover {
	transform: scale(1.08);
}

/* Counter placement below field (balanced spacing) */
.wordai-seo-char-counter {
	margin-top: 4px;
	margin-bottom: 4px;
	font-size: 12px;
	color: #666;
}

/* Dark mode adjustments */
body.is-dark-theme .wordai-seo-field-top label {
	color: #ddd;
}
body.is-dark-theme .wordai-seo-rank-circle {
	background: #2d2f33;
	color: #e0e0e0;
	border-color: #444;
}
/* ============================================================
   📱 Mobile-Responsive Layout for SEO Rank Circles
   ============================================================ */

@media (max-width: 480px) {
	.wordai-seo-field-top {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.wordai-seo-field-top label {
		font-size: 13px;
		margin-bottom: 2px;
	}

	.wordai-seo-rank-circle {
		margin-left: 0;
		margin-top: 4px;
		align-self: flex-start;
		transform: none !important;
	}

	.wordai-seo-char-counter {
		font-size: 11px;
		color: #777;
	}
}


/* ============== WordAI Modal – Clean Reset ============== */
/* 1) Leave the original div hidden until jQuery UI opens it */
#metabox-button-click-dialog.sc-wordai-global-dialog {
  display: none;
}

/* 2) jQuery UI wrapper (NO extra inner window, minimal padding) */
.ui-dialog.metabox-button-click-popup-dialog-class {
  border: none !important;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0,0,0,0.2);
  overflow: hidden;
  animation: wordaiFadeIn 240ms ease-out;
  z-index: 100002 !important;
}

/* 3) Actual content area — keep padding modest to avoid “big padding” look */
.ui-dialog.metabox-button-click-popup-dialog-class .ui-dialog-content {
  padding: 18px 22px !important;
  max-height: 80vh;
  overflow-y: auto;
}

/* 4) Overlay (subtle dim) */
.ui-widget-overlay {
  background: rgba(0,0,0,0.24) !important;
}

/* 5) Fade-in keyframes */
@keyframes wordaiFadeIn {
  from { opacity: 0; transform: translateY(-10px) }
  to   { opacity: 1; transform: translateY(0) }
}

/* ============== WordAI Content Generation Modal Window - Checkbox “Pill” Look (keep native checkbox visible) ============== */
/* Layout: label already wraps: [input.checkbox][span.sc-wordai-items-label] */
.wordai-metabox-wrapper-table label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 8px 6px 0;
}

/* Keep native checkbox for clarity & accessibility */
.sc-wordai-content-generate-options {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: #007cba; /* clear WP blue tick */
}

/* The pill */
.sc-wordai-items-label {
  line-height: 1;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #d3d7dc;
  background: #f6f7f7;
  color: #1d2327;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
  user-select: none;
  cursor: pointer;
}

/* Hover */
label:hover .sc-wordai-items-label {
  background: #eaf4ff;
  border-color: #7cc1ea;
}

/* Checked state: style the pill via sibling selector */
.sc-wordai-content-generate-options:checked + .sc-wordai-items-label {
  background: #007cba;
  border-color: #007cba;
  color: #fff;
}

.wordai-seo-header-copy {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 5px;
}

.wordai-seo-owner-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	max-width: 100%;
	gap: 4px;
	padding: 3px 6px;
	border: 1px solid #a7f3d0;
	border-radius: 5px;
	background: #f0fdf4;
	color: #166534;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.25;
}

.wordai-seo-owner-badge.has-conflict {
	border-color: #fdba74;
	background: #fff7ed;
	color: #9a3412;
}

.wordai-seo-owner-badge .dashicons {
	width: 13px;
	height: 13px;
	font-size: 13px;
	line-height: 13px;
}

.wordai-checkbox-group label.wordai-tier-option-locked {
  opacity: 0.72;
}

.wordai-checkbox-group label.wordai-tier-option-locked:hover .sc-wordai-items-label,
.wordai-checkbox-group label.wordai-tier-option-locked .sc-wordai-items-label {
  background: #f6f7f7;
  border-color: #d3d7dc;
  color: #50575e;
  cursor: not-allowed;
}

.wordai-checkbox-group label.wordai-tier-option-locked input {
  cursor: not-allowed;
}

.wordai-option-lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-left: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f0f3f6;
  border: 1px solid #d3d7dc;
  color: #50575e;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wordai-option-lock-badge-link {
  background: #eaf4ff;
  border-color: #8cc8ff;
  color: #0a5fd3 !important;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.wordai-option-lock-badge-link:hover,
.wordai-option-lock-badge-link:focus {
  background: #d9ecff;
  border-color: #4f9ff2;
  color: #064f9e !important;
  outline: none;
  text-decoration: none;
}

.wordai-tier-option-hint {
  margin: 10px 0 0;
  color: #646970;
  font-size: 12px;
  line-height: 1.55;
}

/* Group headings and inputs spacing tidy-up */
.wordai-prompt-hints-label,
.seo-feature-label { margin: 6px 0 4px; font-weight: 600; color: #1d2327; }
.scwordai-prompt { width: 100%; padding: 9px 11px; border: 1px solid #ccd0d4; border-radius: 6px; }
.wordai-metabox-wrapper-table { width: 100%; }
.wordai-metabox-wrapper-table td { padding: 8px 6px; vertical-align: top; }

/* ============== END WordAI Content Generation Modal – Clean Reset ============== */

/* =============== Start WordAI Options Grid =============== */
.wordai-options-grid {
	display: flex;
	gap: 16px;
	align-items: stretch;
	justify-content: space-between;
	flex-wrap: wrap;
	box-sizing: border-box;
	padding-right: 8px; /* avoid touching right border */
}

.wordai-card {
	flex: 1 1 calc(33.333% - 12px); /* evenly distributed, respects gap */
	min-width: 260px;                /* avoid squish on mid-size */
	background: #f9f9f9;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 16px 18px;
	box-sizing: border-box;          /* important! prevents width blowout */
	box-shadow: 0 1px 2px rgba(0,0,0,0.04);
	transition: box-shadow 0.25s ease;
}

/* Hover lift */
.wordai-card:hover {
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.wordai-card-header {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 10px;
	padding-left: 8px;
	border-left: 3px solid #007cba;
	color: #1d2327;
}

.wordai-checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: flex-start;
}

.wordai-checkbox-group label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

/* Compact secondary buttons inside generated content sections */
.button.button-secondary.small-btn {
	font-size: 12px;
	padding: 2px 10px;
	height: auto;
	line-height: 1.5;
}

.scwordai-title button.button-secondary,
.scwordai-content button.button-secondary,
.scwordai-excerpt button.button-secondary,
.scwordai-tags button.button-secondary,
.scwordai-seo-title button.button-secondary,
.scwordai-seo-meta-description button.button-secondary,
.scwordai-seo-meta-focus-keyword button.button-secondary,
.scwordai-image button.button-secondary {
	font-size: 12px;
	padding: 2px 10px;
	margin-right: 6px;
	margin-top: 4px;
}


/* Responsive breakpoints */
@media (max-width: 1280px) {
	.wordai-card { flex: 1 1 calc(50% - 10px); }
}
@media (max-width: 760px) {
	.wordai-card { flex: 1 1 100%; }
}

/* Fade-in animation for generated result sections */
/* Smooth fade-in for dynamically shown result sections (auto-detect display change) */
.wordai-generated-block {
	display: none;                 /* default hidden state */
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

/* When shown (via jQuery .show()), fade-in automatically */
.wordai-generated-block[style*="display: block"],
.wordai-generated-block[style*="display: inline-block"],
.wordai-generated-block[style*="display: flex"],
.wordai-generated-block[style*="display: grid"] {
	opacity: 1 !important;
	transform: translateY(0);
}

/* Slight delay between multiple blocks appearing for smooth sequence */
.wordai-generated-block + .wordai-generated-block {
	transition-delay: 0.05s;
}


/* Small buttons */
.small-btn {
	font-size: 12px !important;
	padding: 2px 10px !important;
	line-height: 1.5;
	height: auto !important;
}

/* =============== END WordAI Options Grid =============== */

/* ========== 1) Prompt / Actions spacing ========== */
.wordai-prompt-section .scwordai-prompt {
  margin-bottom: 12px; /* adds breathing space before buttons */
}
.wordai-actions-row {
  gap: 10px;
  margin-top: 6px; /* ensures no edge-touching with input */
}
.wordai-actions-row .button {
  min-width: 120px;
}

/* ========== 2) Options Grid: 3 cards inline, responsive ========== */
.wordai-options-grid {
  display: flex;
  gap: 16px;
  align-items: stretch;
  justify-content: space-between;
  flex-wrap: nowrap;            /* keep 3 in a single line when space allows */
  margin-top: 10px;
}

.wordai-card:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.08); }

/* headings + vertical list inside cards */
.wordai-card-header {
  font-size: 14px; font-weight: 600; margin-bottom: 10px;
  padding-left: 8px; border-left: 3px solid #007cba; color: #1d2327;
}
.wordai-checkbox-group { display: flex; flex-direction: column; gap: 6px; }

/* Wrap gracefully on narrower widths */
@media (max-width: 1280px) {
  .wordai-options-grid { flex-wrap: wrap; }
  .wordai-card { flex: 0 0 calc(50% - 8px); } /* 2 columns */
}
@media (max-width: 760px) {
  .wordai-card { flex: 0 0 100%; }            /* 1 column */
}

/* ========== 3) Modal vertical scrolling only (no horizontal) ========== */
/* Ensure the dialog content is the scroll container, vertical only */
.ui-dialog.metabox-button-click-popup-dialog-class .ui-dialog-content {
  max-height: 80vh;               /* keeps it within viewport */
  overflow-y: auto;               /* vertical scroll when results grow */
  overflow-x: hidden;             /* prevent horizontal scroll */
}

/* Make internal blocks behave nicely within width */
#metabox-button-click-dialog.sc-wordai-global-dialog,
#metabox-button-click-dialog .wordai-metabox-wrapper-table {
  width: 100%;
}
#metabox-button-click-dialog textarea,
#metabox-button-click-dialog input[type="text"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Optional: modern scrollbar for WebKit (vertical only) */
.ui-dialog.metabox-button-click-popup-dialog-class .ui-dialog-content::-webkit-scrollbar {
  width: 10px;
}
.ui-dialog.metabox-button-click-popup-dialog-class .ui-dialog-content::-webkit-scrollbar-thumb {
  background-color: #c7ccd1;
  border-radius: 10px;
}

/* Keep the dialog using its calculated workspace position. */
.ui-dialog.metabox-button-click-popup-dialog-class {
  transform: none !important;
}

/* Small result buttons (copy/insert) – already used */
.button.button-secondary.small-btn {
  font-size: 12px !important;
  padding: 2px 10px !important;
  line-height: 1.5;
  height: auto !important;
}

/* =============== END WordAI Modal =============== */


/* ===========================
   Sticky Subheader – Optimized (No Flicker)
   =========================== */

/* Base sticky container */
.wordai-options-grid {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #f8f9fa;
  padding: 10px 0;
  border-bottom: 1px solid #e2e4e7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);

  /* ✅ No transition or GPU transform (these cause flicker in growing modals) */
  transition: none !important;
  transform: none !important;
  backface-visibility: hidden;
  will-change: auto;
}

/* Individual cards inside sticky area */
.wordai-card {
  background: #ffffff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: none !important; /* ✅ disable per-frame box-shadow transitions */
}

/* Sticky active compression (visual polish only) */
.wordai-options-grid.is-stuck {
  background-color: #f5f6f8;
  padding: 6px 0;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* Subtle compression for each card */
.wordai-options-grid.is-stuck .wordai-card {
  padding: 10px 14px;
}

/* Title style */
.wordai-card-header {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  padding-left: 8px;
  border-left: 3px solid #007cba;
  color: #1d2327;
}

/* No animation during height growth */
@keyframes wordaiStickyFade {}

/* Responsive safeguard */
@media (max-width: 760px) {
  .wordai-options-grid {
    position: static;
    box-shadow: none;
    border-bottom: none;
  }
}

/* ================================================
   Modal Growth Stability – Containment & Isolation
   ================================================ */

/* Contain modal internal reflows so sticky area doesn’t jitter */
.ui-dialog.metabox-button-click-popup-dialog-class .ui-dialog-content {
  contain: layout paint;
  overflow-x: hidden;
  transform: none !important;
}

/* Prevent the dialog itself from animating height */
#metabox-button-click-dialog {
  transition: none !important;
}




/* Start Enaable Social Meta Box */
.wordai-seo-toggle {
	margin-top: 8px;
}
.wordai-seo-toggle label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
}
.wordai-seo-toggle .description {
	display: block;
	margin-top: 4px;
	color: #646970;
}
/* End Enaable Social Meta Box */

/* ==============================================================
   WordAI API Content Generation – Horizontal Wave Loader
   Premium | Compact | Flowing Gradient | Dark Mode | Responsive
   ============================================================== */
.sc-wave {
  display: flex;
  flex-direction: row;          /* 👈 arrange bars horizontally */
  align-items: flex-end;        /* align bottoms of bars */
  justify-content: center;      /* center within table cell */
  gap: 4px;                     /* space between bars */
  margin: 10px auto;
  padding: 6px 0;
  opacity: 0.95;
  user-select: none;
}

/* --- Wave Bars --- */
.sc-wave .wave {
  width: 6px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(180deg, #007cba, #00b3ee);
  background-size: 200% 200%;
  animation:
    scWavePulse 1.1s ease-in-out infinite,
    scGradientShift 2.8s linear infinite;
  transform-origin: center bottom;
  box-shadow: 0 0 4px rgba(0, 124, 186, 0.35);
}

/* Gradient animation (color flow illusion) */
@keyframes scGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Pulse motion (vertical stretch) */
@keyframes scWavePulse {
  0%, 100% { transform: scaleY(0.5); opacity: 0.7; }
  50%      { transform: scaleY(1.1); opacity: 1;   }
}

/* Staggered delays for wave rhythm */
.sc-wave .wave:nth-child(1)  { animation-delay: 0s, 0s; }
.sc-wave .wave:nth-child(2)  { animation-delay: 0.08s, 0.15s; }
.sc-wave .wave:nth-child(3)  { animation-delay: 0.16s, 0.3s; }
.sc-wave .wave:nth-child(4)  { animation-delay: 0.24s, 0.45s; }
.sc-wave .wave:nth-child(5)  { animation-delay: 0.32s, 0.6s; }
.sc-wave .wave:nth-child(6)  { animation-delay: 0.40s, 0.75s; }
.sc-wave .wave:nth-child(7)  { animation-delay: 0.48s, 0.9s; }
.sc-wave .wave:nth-child(8)  { animation-delay: 0.56s, 1.05s; }
.sc-wave .wave:nth-child(9)  { animation-delay: 0.64s, 1.2s; }
.sc-wave .wave:nth-child(10) { animation-delay: 0.72s, 1.35s; }

/* --- Label below the waves --- */
/* ==============================================================
   Centered "Generating…" Label with Soft Glow
   ============================================================== */
.sc-wave-label {
  display: block;
  width: 100%;
  text-align: center;             /* ⬅ centers text horizontally */
  margin-top: 6px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: #1d2327;
  opacity: 0.9;
  text-shadow: 0 0 6px rgba(0, 124, 186, 0.3); /* subtle glow */
  animation: scLabelGlow 2.2s ease-in-out infinite;
}

@keyframes scLabelGlow {
  0%, 100% {
    opacity: 0.75;
    text-shadow: 0 0 6px rgba(0, 124, 186, 0.3);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 10px rgba(0, 124, 186, 0.6);
  }
}

/* Dark mode variant */
@media (prefers-color-scheme: dark) {
  .sc-wave-label {
    color: #f1f5f9;
    text-shadow: 0 0 8px rgba(0, 179, 255, 0.6);
  }
}

/* ==============================================================
   End WordAI API Content Generation – Horizontal Wave Loader
   Premium | Compact | Flowing Gradient | Dark Mode | Responsive
   ============================================================== */

   /* =============================================================
   🟡 WordAI — Spacing Polish - AI Agent Chat Settings Tab Page
   *  Spacing polish for radios/checkboxes
   ============================================================= */	
.wa-fieldset label { display:inline-flex; align-items:center; gap:6px; margin-right:16px; margin-bottom:8px; }
.wa-col-600 .regular-text, .wa-col-600 textarea { max-width:600px; width:100%; }
.wa-color-field { max-width:160px; }

/* ==========================================================
   AI Chat — Embedding Status Notices
   ========================================================== */
.wordai-embedding-warning,
.wordai-embedding-success {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 6px;
  line-height: 1.6;
  font-size: 14px;
  display: block;
}

.wordai-embedding-warning {
  background: #fff8e5;
  border: 1px solid #e2c045;
  color: #7a5c00;
}

.wordai-embedding-success {
  background: #e8f8ee;
  border: 1px solid #3bb26b;
  color: #1f5133;
}

.wordai-embedding-warning .dashicons,
.wordai-embedding-success .dashicons {
  vertical-align: middle;
  margin-right: 6px;
  font-size: 16px;
}

/* Subtle fade animation for polish */
.wordai-embedding-warning,
.wordai-embedding-success {
  animation: fadeSlideIn 0.35s ease;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/** ==============================================================
 * AI Agent: Contents Embedding Tab. Helper: Progress Bar + Remaining Time
 * ============================================================== */
.wa-progress-bar {
  transition: width 0.4s ease-in-out;
  background-color: #2271b1; /* WP blue */
}
.wa-progress-label {
  font-weight: 600;
  color: #1d2327;
}
.wa-progress-eta {
  font-size: 13px;
  color: #50575e;
  margin-top: 4px;
  display: block;
}

/* ==================================================================
   🔧 WordAI Agent — Failed Items Modal Table Enhancements
   ------------------------------------------------------------------
   - Compact text size for dense data (hundreds of rows)
   - Consistent column spacing + horizontal scroll for long messages
   - Word-break handling for error messages
   ================================================================== */
#wa-failed-modal {
  font-size: 12px;
  color: #333;
}

#wa-failed-modal table.widefat {
  font-size: 12px;
  line-height: 1.4;
}

#wa-failed-modal th {
  background: #f6f7f7;
  font-weight: 600;
  text-align: left;
  padding: 6px 8px;
}

#wa-failed-modal td {
  padding: 5px 8px;
  vertical-align: top;
}

#wa-failed-modal td a {
  color: #0073aa;
  text-decoration: none;
}

#wa-failed-modal td a:hover {
  text-decoration: underline;
}

#wa-failed-modal .ui-dialog-titlebar {
  font-size: 13px;
  font-weight: 600;
}

#wa-failed-modal .ui-dialog-content {
  padding: 6px 8px !important;
}

#wa-failed-list td:nth-child(4) {
  white-space: normal;
  word-break: break-word;
  max-width: 350px;
}

/* Add light zebra and hover for readability */
#wa-failed-list tr:nth-child(even) {
  background: #fafafa;
}
#wa-failed-list tr:hover {
  background: #f1f5f9;
}

.sc-wordai-modal-default .ui-dialog-titlebar {
    background: #007cba;
    color: #fff;
    border: none;
}

.sc-wordai-modal-default .ui-dialog-buttonpane {
    border-top: 1px solid #ddd;
    padding-top: 10px;
}
.sc-wordai-admin-notice-missing-key {
    border-left: 5px solid #673ab7 !important;
    background: #f6f0ff !important;
}

.sc-wordai-admin-notice-missing-key .button-primary {
    background: #673ab7 !important;
    border-color: #562da0 !important;
    box-shadow: none !important;
}
/* =========================================================
   WORDAI ADMIN HEADER (Layout)
   ========================================================= */
.sc-wordai-admin-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 0 10px;
  border-bottom:1px solid #e5e5e5;
  margin-bottom:20px;
}

.sc-wordai-header-left{
  display:flex;
  align-items:center;
  gap:12px;
}

.sc-wordai-header-logo{
  width:48px;
  height:48px;
  display:block;
  object-fit:contain;
}

.sc-wordai-header-title{
  font-size:30px;
  font-family:"Poppins", "Segoe UI", sans-serif;
  font-weight:800;
  line-height:1;
  letter-spacing:0;
  display:inline-flex;
  align-items:center;
  gap:2px;
  min-height:48px;
  padding:2px 0;
  color:#0f172a;
  text-shadow:0 1px 0 rgba(255,255,255,.55);
}

.sc-wordai-header-title-word{
  color:#0f172a;
}

.sc-wordai-header-title-ai{
  color:#ffffff;
  padding:4px 8px 5px;
  border-radius:7px;
  background:linear-gradient(135deg, #2142a6 0%, #7c3aed 52%, #e11d48 100%);
  box-shadow:0 8px 18px rgba(66, 74, 200, .22), inset 0 1px 0 rgba(255,255,255,.35);
}

.sc-wordai-header-right{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}

/* Responsive for small screens */
@media (max-width:700px){
  .sc-wordai-admin-header{
    flex-direction:column;
    align-items:flex-start;
  }

  .sc-wordai-header-title{
    min-height:auto;
    padding-right:0;
  }

  .sc-wordai-header-right{
    align-items:flex-start;
    margin-top:15px;
  }
}

/* =========================================================
   WORDAI ADMIN MENU ICON STATES
   ========================================================= */
#adminmenu .toplevel_page_word-ai-topmenu .wp-menu-image img{
  width:20px;
  height:20px;
  padding:7px 0;
  opacity:.72;
  transition:opacity .18s ease, transform .18s ease;
}

#adminmenu .toplevel_page_word-ai-topmenu:hover .wp-menu-image img,
#adminmenu .toplevel_page_word-ai-topmenu.current .wp-menu-image img,
#adminmenu .toplevel_page_word-ai-topmenu.wp-has-current-submenu .wp-menu-image img,
#adminmenu .toplevel_page_word-ai-topmenu.opensub .wp-menu-image img{
  content:url("images/wordai-2026-menu-bright-20x20.svg");
  opacity:1;
  transform:translateY(-.5px);
}


/* =========================================================
   PROVIDER PICKER (Global - works everywhere)
   - Keep existing classes for backward compatibility
   - Use data-context to adjust layout per placement
   ========================================================= */
.sc-wordai-provider-picker{
  display:flex;
  flex-direction:column; /* default vertical (settings header style) */
  gap:6px;
}

.sc-wordai-provider-label{
  font-size:14px;
  font-weight:600;
  color:#444;
  margin:0;
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.sc-wordai-select-wrapper{
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 204px;
}

.sc-wordai-provider-current-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 0;
  height: 0;
  pointer-events: none;
}

.sc-wordai-provider-current-icon__item {
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
}

.sc-wordai-select-wrapper[data-active-provider="openai"] .sc-wordai-provider-current-icon__item--openai,
.sc-wordai-select-wrapper[data-active-provider="google"] .sc-wordai-provider-current-icon__item--google,
.sc-wordai-select-wrapper[data-active-provider="anthropic"] .sc-wordai-provider-current-icon__item--anthropic,
.sc-wordai-select-wrapper[data-active-provider="xai"] .sc-wordai-provider-current-icon__item--xai {
  display: inline-flex;
}

.sc-wordai-provider-current-icon img {
  display: block;
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.sc-wordai-provider-current-icon i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-family: "Font Awesome 6 Free";
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  color: #1d4ed8;
}

.sc-wordai-provider-select{
  appearance:auto;
  padding:7px 10px 7px 34px;
  font-size:13px;
  line-height:1.2;
  min-width:180px;
  border-radius:8px;
  border:1px solid #c7c7c7;
  background:#fff;
  color:#1d2327;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.sc-wordai-provider-native-select {
  position: absolute !important;
  inset: 0 auto auto 0 !important;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.sc-wordai-provider-combobox {
  width: 100%;
  min-width: 204px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  padding: 0 34px 0 11px;
  border: 1px solid #c7d2fe;
  border-radius: 9px;
  background: #fff;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.sc-wordai-provider-combobox:hover,
.sc-wordai-select-wrapper.is-open .sc-wordai-provider-combobox {
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, .13), 0 6px 16px rgba(15, 23, 42, .08);
}

.sc-wordai-provider-combobox:focus {
  outline: none;
  border-color: #2271b1;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, .18), 0 6px 16px rgba(15, 23, 42, .08);
}

.sc-wordai-provider-combobox-icon,
.sc-wordai-provider-option-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sc-wordai-provider-combobox-icon img,
.sc-wordai-provider-option-icon img {
  display: block;
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.sc-wordai-provider-combobox-icon img[src*="gemini-logo.svg"],
.sc-wordai-provider-option-icon img[src*="gemini-logo.svg"] {
  transform: translateY(4.5px);
}

.sc-wordai-provider-combobox-icon i,
.sc-wordai-provider-option-icon i {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Font Awesome 6 Free";
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  color: #1d4ed8;
}

.sc-wordai-provider-combobox-label,
.sc-wordai-provider-option-label {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  line-height: 1.15;
  white-space: nowrap;
}

.sc-wordai-provider-combobox-caret {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: translateY(-65%) rotate(45deg);
  transition: transform .16s ease;
  pointer-events: none;
}

.sc-wordai-select-wrapper.is-open .sc-wordai-provider-combobox-caret {
  transform: translateY(-25%) rotate(225deg);
}

.sc-wordai-provider-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 10050;
  display: none;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid #dbe4ff;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .17);
}

.sc-wordai-select-wrapper.is-open .sc-wordai-provider-options {
  display: block;
}

.sc-wordai-provider-option {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #172033;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  text-align: left;
}

.sc-wordai-provider-option:hover,
.sc-wordai-provider-option:focus,
.sc-wordai-provider-option.is-active {
  outline: none;
  background: #edf5ff;
  color: #0f4f8f;
}

/* Focus = WP-like but nicer */
.sc-wordai-provider-select:focus{
  outline:none;
  border-color:#2271b1;
  box-shadow:0 0 0 2px rgba(34,113,177,.18);
}

/* Hover */
.sc-wordai-provider-select:hover{
  border-color:#a7a7a7;
}

/* Optgroup styling (browser-limited, still helps) */
.sc-wordai-provider-select optgroup{
  font-weight:700;
}


/* =========================================================
   CONTEXT OVERRIDES (same HTML, different look)
   Uses your existing data-context attribute
   ========================================================= */

/* Popup/modal: label + dropdown inline */
.sc-wordai-provider-picker .sc-wordai-ai-provider-select[data-context="suggest_title_popup"],
.sc-wordai-provider-picker .sc-wordai-ai-provider-select[data-context="content_popup"],
.sc-wordai-provider-picker .sc-wordai-ai-provider-select[data-context="popup"]{
  /* no direct styling needed here; parent handles layout below */
}

/* When selector is in popups, force horizontal/inline layout */
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="suggest_title_popup"]),
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="content_popup"]),
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="popup"]){
  flex-direction:row;
  align-items:center;
  gap:10px;
}

/* Make label compact in popups */
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="suggest_title_popup"]) .sc-wordai-provider-label,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="content_popup"]) .sc-wordai-provider-label,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="popup"]) .sc-wordai-provider-label{
  margin:0;
  white-space:nowrap;
  font-size:13px;
}

/* Slightly smaller select in popups */
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="suggest_title_popup"]) .sc-wordai-provider-select,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="content_popup"]) .sc-wordai-provider-select,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="popup"]) .sc-wordai-provider-select{
  min-width:176px;
  height:30px !important;
  min-height:30px !important;
  padding:0 9px 0 32px !important;
  font-size:12px !important;
  line-height:1.2 !important;
  border-radius:8px;
}

.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="suggest_title_popup"]) .sc-wordai-select-wrapper,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="content_popup"]) .sc-wordai-select-wrapper,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="popup"]) .sc-wordai-select-wrapper {
  min-width: 184px;
}

.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="suggest_title_popup"]) .sc-wordai-provider-combobox,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="content_popup"]) .sc-wordai-provider-combobox,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="popup"]) .sc-wordai-provider-combobox {
  min-width: 184px;
  height: 30px;
  gap: 7px;
  padding: 0 28px 0 9px;
  border-radius: 8px;
  font-size: 12px;
}

.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="suggest_title_popup"]) .sc-wordai-provider-combobox-icon,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="content_popup"]) .sc-wordai-provider-combobox-icon,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="popup"]) .sc-wordai-provider-combobox-icon {
  flex-basis: 16px;
  width: 16px;
  height: 16px;
}

.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="suggest_title_popup"]) .sc-wordai-provider-options,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="content_popup"]) .sc-wordai-provider-options,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="popup"]) .sc-wordai-provider-options {
  width: 100%;
  min-width: 0;
}

.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="suggest_title_popup"]) .sc-wordai-provider-option,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="content_popup"]) .sc-wordai-provider-option,
.sc-wordai-provider-picker:has(.sc-wordai-ai-provider-select[data-context="popup"]) .sc-wordai-provider-option {
  min-height: 30px;
  gap: 7px;
  font-size: 12px;
}


/* =========================================================
   POPUP PROVIDER BLOCK (your existing modal layout)
   - Keeps your 2-row structure stable
   ========================================================= */
.sc-wordai-popup-provider-block{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:10px;
}

.sc-wordai-popup-provider-row{
  display:flex;
  align-items:center;
}

.sc-wordai-popup-provider-row--right{
  justify-content:flex-end;
}

/* Keep picker compact */
.sc-wordai-popup-provider-row .sc-wordai-provider-picker{
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:8px;
}

/* Provider switch message */
.sc-wordai-provider-switch-msg{
  display:none;
  text-align:right;
  font-size:12px;
  padding:6px 10px;
  border-radius:8px;
  line-height:1.35;
  box-sizing:border-box;
}

.sc-wordai-provider-switch-msg.is-success{
  background:#e7f7ed;
  border-left:4px solid #00a32a;
  color:#14532d;
}

.sc-wordai-provider-switch-msg.is-error{
  background:#fde8e8;
  border-left:4px solid #d63638;
  color:#7f1d1d;
}


/* =========================================================
   DISABLED STATE (provider lock)
   - Works with your existing class
   ========================================================= */
.sc-wordai-provider-picker--disabled{
  opacity:.65;
}

.sc-wordai-provider-picker--disabled .sc-wordai-provider-select{
  background:#f6f7f7;
  border-color:#dcdcde;
  color:#646970;
  cursor:not-allowed;
  box-shadow:none;
}

/* Cleaner disabled select appearance */
.sc-wordai-provider-picker select:disabled{
  opacity: .65;
  background-color: #f6f7f7;
  color: #50575e;
  cursor: not-allowed;
}

/* Reduce ugly arrow emphasis on disabled select (browser-dependent) */
.sc-wordai-provider-picker select:disabled{
  background-image: none !important;
}

.sc-wordai-provider-picker--disabled .sc-wordai-provider-select:hover{
  border-color:#dcdcde; /* no hover change */
}
.sc-wordai-provider-picker--disabled{
  pointer-events: none;
}


/* =========================================================
   WRAP PANEL (kept as-is but slightly refined)
   ========================================================= */
.wrap{
  font-family:"Segoe UI","Roboto",sans-serif;
  color:#23282d;
  background:#fff;
  padding:20px;
  border:1px solid #e5e5e5;
  border-radius:10px;
  box-shadow:0 3px 8px rgba(0,0,0,.07);
}

.sc-wordai-api-key-missing-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 20px 18px 2px;
  padding: 16px 18px;
}

.sc-wordai-notice-warning {
  background: linear-gradient(135deg, #ffffff 0%, #f7fbff 60%, #fff8ee 100%);
  border: 1px solid #d6e3f7;
  border-left: 5px solid #3155b7;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(20, 40, 90, 0.1);
}

.sc-wordai-api-key-missing-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(49, 85, 183, 0.16);
  box-shadow: 0 8px 18px rgba(20, 40, 90, 0.08);
}

.sc-wordai-api-key-notice-logo {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.sc-wordai-api-key-missing-content {
  flex: 1 1 auto;
  min-width: 220px;
}

.sc-wordai-api-key-missing-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #3155b7;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sc-wordai-api-key-missing-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 5px;
  color: #172033;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.sc-wordai-api-key-missing-message {
  margin: 0;
  color: #4b5565;
  font-size: 14px;
  line-height: 1.55;
}

.sc-wordai-api-key-missing-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  margin-left: auto;
  border-radius: 7px;
  background: #3155b7;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 16px rgba(49, 85, 183, 0.2);
}

.sc-wordai-api-key-missing-action:hover,
.sc-wordai-api-key-missing-action:focus {
  background: #24449f;
  color: #ffffff;
  text-decoration: none;
  outline: none;
  box-shadow: 0 0 0 3px rgba(49, 85, 183, 0.18);
}

.sc-wordai-inline-icon {
  color: #3155b7;
  font-size: 14px;
  line-height: 1;
  display: inline-block;
}

@media (max-width: 782px) {
  .sc-wordai-api-key-missing-notice {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .sc-wordai-api-key-missing-action {
    margin-left: 68px;
  }
}

.sc-wordai-support-page-wrapper {
  max-width: 1240px;
}

.sc-wordai-support-page-header {
  margin-bottom: 18px;
}

.sc-wordai-support-page-header-copy h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
}

.sc-wordai-support-page-header-copy p {
  margin: 0;
  color: #50575e;
}

.sc-wordai-support-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.sc-wordai-support-summary-card {
  padding: 16px 18px;
  border: 1px solid #dcdcde;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.sc-wordai-support-summary-label {
  display: block;
  margin-bottom: 8px;
  color: #50575e;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sc-wordai-support-summary-value {
  display: block;
  color: #1d2327;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}

.sc-wordai-support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr);
  gap: 18px;
}

.sc-wordai-support-form-card,
.sc-wordai-support-diagnostics-card {
  padding: 18px 20px;
  border: 1px solid #dcdcde;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.sc-wordai-support-form-card h3,
.sc-wordai-support-diagnostics-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 16px;
}

.sc-wordai-support-request-form .form-table th {
  width: 190px;
  padding-top: 14px;
}

.sc-wordai-support-request-form .form-table td {
  padding-top: 12px;
}

.sc-wordai-support-request-form input[type="text"],
.sc-wordai-support-request-form input[type="email"],
.sc-wordai-support-request-form select,
.sc-wordai-support-request-form textarea {
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  border-radius: 10px;
}

.sc-wordai-support-request-form textarea {
  min-height: 160px;
}

.sc-wordai-support-attachment-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px 0 6px;
}

.button.sc-wordai-support-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 600;
  line-height: 1;
}

.button.sc-wordai-support-attach-btn .dashicons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin: 0;
  font-size: 18px;
  line-height: 1;
}

.button.sc-wordai-support-attach-btn:hover,
.button.sc-wordai-support-attach-btn:focus {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
}

.sc-wordai-support-attachment-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  width: 100%;
  color: #475569;
  font-size: 12px;
}

.sc-wordai-support-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
}

.sc-wordai-support-delivery-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sc-wordai-support-delivery-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 15px;
  border: 1px solid #dcdcde;
  border-radius: 12px;
  background: #f8fafc;
}

.sc-wordai-support-delivery-card input[type="radio"] {
  margin: 0 0 6px;
}

.sc-wordai-support-delivery-card.is-active {
  border-color: #8bbbe7;
  background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
}

.sc-wordai-support-delivery-card.is-disabled {
  opacity: 0.7;
}

.sc-wordai-support-delivery-title {
  font-weight: 600;
  color: #1d2327;
}

.sc-wordai-support-diagnostics-consent-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
}

.sc-wordai-support-diagnostics-consent-label input[type="checkbox"] {
  margin-top: 2px;
}

.sc-wordai-support-submit-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 0;
}

.button.button-primary.sc-wordai-support-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 24px !important;
  border-radius: 999px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  box-shadow: 0 8px 18px rgba(31, 111, 235, 0.16);
}

.button.button-primary.sc-wordai-support-send-btn .dashicons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  width: 18px;
  height: 18px;
  margin: 0;
}

.sc-wordai-support-submit-feedback {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #dcdcde;
  border-radius: 10px;
  background: #f6f7f7;
  color: #1d2327;
}

.sc-wordai-support-submit-feedback.is-pending {
  border-color: #f2cf8f;
  background: linear-gradient(180deg, #fff9ef 0%, #fff5df 100%);
  color: #a15c00;
  font-size: 15px;
  font-weight: 700;
}

.sc-wordai-support-submit-feedback.is-success {
  border-color: #a3d9a5;
  background: #f4fbf5;
  color: #1f6b24;
}

.sc-wordai-support-submit-feedback.is-error {
  border-color: #e7b7b8;
  background: #fff7f7;
  color: #8a2424;
}

.sc-wordai-support-diagnostics-preview-list {
  margin: 0 0 14px;
  padding-left: 18px;
}

.sc-wordai-support-diagnostics-preview-list li + li {
  margin-top: 8px;
}

.sc-wordai-support-diagnostics-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f6f7f7;
  color: #50575e;
}

.sc-wordai-support-diagnostics-privacy-note .dashicons {
  color: #1f6feb;
}

.sc-wordai-support-history-card {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid #dcdcde;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.sc-wordai-support-history-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 16px;
}

.sc-wordai-support-history-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

.sc-wordai-support-history-table td,
.sc-wordai-support-history-table th {
  vertical-align: top;
}

.sc-wordai-support-ticket-trigger {
  font-weight: 700 !important;
  text-decoration: none !important;
}

.sc-wordai-support-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.sc-wordai-support-status-badge.is-open {
  color: #1e40af;
  background: #dbeafe;
  border-color: #bfdbfe;
}

.sc-wordai-support-status-badge.is-replied {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.sc-wordai-support-status-badge.is-waiting {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.sc-wordai-support-status-badge.is-resolved {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.sc-wordai-support-status-badge.is-error {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.sc-wordai-support-channel-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  min-width: 120px;
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
}

.sc-wordai-support-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.sc-wordai-support-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.sc-wordai-support-modal-dialog {
  position: relative;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: 24px auto;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.sc-wordai-support-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.sc-wordai-support-modal-body {
  max-height: calc(100vh - 180px);
  overflow: auto;
  padding: 22px 24px 24px;
}

.sc-wordai-support-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sc-wordai-support-modal-stat,
.sc-wordai-support-modal-meta,
.sc-wordai-support-modal-thread {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
}

.sc-wordai-support-modal-stat {
  padding: 16px;
}

.sc-wordai-support-modal-stat span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.sc-wordai-support-modal-stat strong {
  display: block;
  margin-top: 10px;
  font-size: 16px;
  color: #0f172a;
}

.sc-wordai-support-modal-stat small {
  display: block;
  margin-top: 8px;
  color: #475569;
}

.sc-wordai-support-modal-meta,
.sc-wordai-support-modal-thread {
  margin-top: 16px;
  padding: 18px;
}

.sc-wordai-support-modal-meta p {
  margin: 0 0 10px;
}

.sc-wordai-support-modal-thread h4 {
  margin: 0 0 14px;
  font-size: 15px;
}

.sc-wordai-support-modal-reply {
  border: 1px solid #dbe1e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.sc-wordai-support-modal-reply.is-user {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.sc-wordai-support-modal-reply.is-support {
  border-color: #fde68a;
  background: linear-gradient(135deg, #fffdf5 0%, #fff7df 100%);
}

.sc-wordai-support-modal-reply + .sc-wordai-support-modal-reply {
  margin-top: 12px;
}

.sc-wordai-support-modal-reply-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
}

.sc-wordai-support-modal-reply-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.sc-wordai-support-modal-reply-avatar img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.sc-wordai-support-modal-reply-content {
  min-width: 0;
  flex: 1;
}

.sc-wordai-support-modal-reply-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.sc-wordai-support-modal-reply-role {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1f6feb;
}

.sc-wordai-support-modal-reply-message {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.sc-wordai-support-modal-empty {
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #fff;
  color: #475569;
}

.sc-wordai-support-modal-reply-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.sc-wordai-support-modal-reply-form textarea {
  width: 100%;
  min-height: 120px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  resize: vertical;
}

.sc-wordai-support-modal-reply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.sc-wordai-support-modal-reply-feedback {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
}

.sc-wordai-support-modal-reply-feedback.is-pending {
  background: #fff7ed;
  color: #9a3412;
}

.sc-wordai-support-modal-reply-feedback.is-success {
  background: #f0fdf4;
  color: #166534;
}

.sc-wordai-support-modal-reply-feedback.is-error {
  background: #fef2f2;
  color: #991b1b;
}

body.sc-wordai-support-modal-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .sc-wordai-support-summary-grid,
  .sc-wordai-support-layout,
  .sc-wordai-support-delivery-options {
    grid-template-columns: 1fr;
  }

  .sc-wordai-support-modal-dialog {
    width: calc(100vw - 20px);
    margin: 10px auto;
  }

  .sc-wordai-support-modal-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   WordAI Modal UX Refresh
   ========================================================== */

#suggest-titles-button-click-dialog.sc-wordai-global-dialog,
#metabox-button-click-dialog.sc-wordai-global-dialog {
  display: none;
}

.ui-dialog.sc-wordai-suggest-dialog,
.ui-dialog.sc-wordai-content-dialog {
  max-width: calc(100vw - 24px);
}

.ui-dialog.sc-wordai-suggest-dialog .ui-dialog-content,
.ui-dialog.sc-wordai-content-dialog .ui-dialog-content {
  overflow-x: hidden;
}

.ui-dialog.sc-wordai-suggest-dialog .ui-dialog-content {
  padding: 18px 20px 20px !important;
}

.ui-dialog.sc-wordai-content-dialog .ui-dialog-content {
  padding: 18px 18px 20px !important;
}

#suggest-titles-button-click-dialog .wordai-suggest-modal-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#suggest-titles-button-click-dialog .wordai-suggest-modal-topbar,
#suggest-titles-button-click-dialog .scwordai-suggested-title-wrapper,
#suggest-titles-button-click-dialog .wordai-suggest-modal-form,
#metabox-button-click-dialog .wordai-content-modal-top,
#metabox-button-click-dialog .wordai-content-modal-toolbar,
#metabox-button-click-dialog .wordai-results-shell,
#metabox-button-click-dialog .wave-animation-row {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

#suggest-titles-button-click-dialog .wordai-suggest-modal-topbar,
#suggest-titles-button-click-dialog .wordai-suggest-modal-form,
#suggest-titles-button-click-dialog .scwordai-suggested-title-wrapper {
  padding: 16px 18px;
}

#suggest-titles-button-click-dialog .sc-wordai-popup-provider-block,
#metabox-button-click-dialog .sc-wordai-popup-provider-block {
  margin: 0;
}

.wordai-modal-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.wordai-modal-section-head h4,
.wordai-modal-section-head h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.wordai-modal-section-note {
  color: #5b6472;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

#suggest-titles-button-click-dialog .prompt-alert-msg,
#metabox-button-click-dialog .prompt-alert-msg {
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#suggest-titles-button-click-dialog .prompt-alert-msg .alert-success,
#suggest-titles-button-click-dialog .prompt-alert-msg .alert-error,
#suggest-titles-button-click-dialog .prompt-alert-msg .alert-remind,
#metabox-button-click-dialog .prompt-alert-msg .alert-success,
#metabox-button-click-dialog .prompt-alert-msg .alert-error,
#metabox-button-click-dialog .prompt-alert-msg .alert-remind {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border-radius: 8px;
  line-height: 1.4;
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

#suggest-titles-button-click-dialog .prompt-alert-msg .alert-success,
#metabox-button-click-dialog .prompt-alert-msg .alert-success {
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #86efac;
}

#suggest-titles-button-click-dialog .prompt-alert-msg .alert-error,
#metabox-button-click-dialog .prompt-alert-msg .alert-error {
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

#suggest-titles-button-click-dialog .prompt-alert-msg .alert-remind,
#metabox-button-click-dialog .prompt-alert-msg .alert-remind {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fbbf24;
}

#suggest-titles-button-click-dialog .prompt-alert-msg br,
#metabox-button-click-dialog .prompt-alert-msg br {
  display: none;
}

.ui-dialog.sc-wordai-suggest-dialog .ui-dialog-titlebar {
  cursor: move;
  padding-left: 52px !important;
}

.ui-dialog.sc-wordai-suggest-dialog .ui-dialog-titlebar-close {
  cursor: pointer;
}

.ui-dialog.sc-wordai-suggest-dialog .ui-dialog-title {
  max-width: calc(100% - 72px);
}

.ui-dialog.sc-wordai-suggest-dialog .wordai-dialog-drag-hint {
  position: absolute;
  left: 14px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  opacity: 0.88;
  pointer-events: none;
}

.ui-dialog.sc-wordai-suggest-dialog .wordai-dialog-drag-hint .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
}

.ui-dialog.sc-wordai-suggest-dialog .ui-dialog-content {
  padding: 12px 12px 14px !important;
}

#suggest-titles-button-click-dialog .wordai-suggest-modal-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#suggest-titles-button-click-dialog .wordai-suggest-modal-topbar {
  margin-bottom: 2px;
}

#suggest-titles-button-click-dialog .wordai-suggest-modal-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#suggest-titles-button-click-dialog .wordai-suggest-modal-topbar,
#suggest-titles-button-click-dialog .wordai-suggest-modal-form,
#suggest-titles-button-click-dialog .scwordai-suggested-title-wrapper {
  padding: 12px 14px;
  border-radius: 12px;
}

#suggest-titles-button-click-dialog .wordai-modal-section-head {
  margin-bottom: 5px;
}

#suggest-titles-button-click-dialog .wordai-modal-section-head h4,
#suggest-titles-button-click-dialog .wordai-modal-section-head h5 {
  font-size: 14px;
}

#suggest-titles-button-click-dialog .wordai-modal-section-note {
  font-size: 11.5px;
  line-height: 1.35;
}

#suggest-titles-button-click-dialog .scwordai-suggest-title-prompt,
#metabox-button-click-dialog .scwordai-prompt,
#metabox-button-click-dialog textarea,
#suggest-titles-button-click-dialog textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0 !important;
  border-radius: 12px;
  border: 1px solid #cfd7e3;
  background: #fbfcfe;
  box-sizing: border-box;
}

#suggest-titles-button-click-dialog .scwordai-suggest-title-prompt,
#metabox-button-click-dialog .scwordai-prompt {
  padding: 12px 14px;
  font-size: 15px;
}

#suggest-titles-button-click-dialog .scwordai-suggest-title-prompt {
  min-height: 42px;
  padding: 9px 12px;
  font-size: 13.5px;
  line-height: 1.35;
}

#metabox-button-click-dialog textarea.scwordai-prompt {
  min-height: 132px;
  line-height: 1.55;
  resize: vertical;
  color: #172033;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

#metabox-button-click-dialog textarea.scwordai-prompt:focus {
  border-color: #1d8fb8;
  box-shadow: 0 0 0 2px rgba(29, 143, 184, 0.14), inset 0 1px 2px rgba(15, 23, 42, 0.06);
  outline: none;
}

#metabox-button-click-dialog textarea.scwordai-prompt.wordai-prompt-needs-attention {
  border-color: #f59e0b;
  background: #fffaf0;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16), inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

#suggest-titles-button-click-dialog .wordai-suggest-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

#suggest-titles-button-click-dialog .wordai-suggest-modal-actions-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#suggest-titles-button-click-dialog .wordai-suggest-modal-actions .button,
#suggest-titles-button-click-dialog .wordai-suggest-results-footer .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(31, 111, 235, 0.12);
}

#suggest-titles-button-click-dialog .wordai-suggest-results-footer .button .dashicons,
#suggest-titles-button-click-dialog .wordai-suggest-results-footer .button i {
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#suggest-titles-button-click-dialog .wordai-suggest-count-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

#suggest-titles-button-click-dialog .wordai-suggest-count-control select {
  margin: 0;
  min-width: 60px;
  min-height: 30px;
  font-size: 12px;
}

#suggest-titles-button-click-dialog .scwordai-suggested-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#suggest-titles-button-click-dialog .sc-wordai-suggested-titles-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

#suggest-titles-button-click-dialog .sc-wordai-suggested-titles-list li {
  margin: 0;
}

#suggest-titles-button-click-dialog .sc-wordai-suggested-titles-list label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #f8fbff;
  font-size: 12.25px;
  line-height: 1.3;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#suggest-titles-button-click-dialog .sc-wordai-suggested-titles-list label:hover {
  border-color: #1f6feb;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.08);
  background: #eef5ff;
}

#suggest-titles-button-click-dialog .suggested-title-radio {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  accent-color: #1f6feb;
}

#suggest-titles-button-click-dialog .wordai-suggest-results-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

#suggest-titles-button-click-dialog .update-suggested-title-msg {
  font-size: 12px;
  line-height: 1.35;
}

#metabox-button-click-dialog .wordai-content-modal-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#metabox-button-click-dialog .wordai-content-modal-top {
  padding: 16px 18px;
}

#metabox-button-click-dialog .wordai-prompt-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#metabox-button-click-dialog .wordai-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

#metabox-button-click-dialog .wordai-actions-row .button,
#metabox-button-click-dialog .wordai-prompt-builder-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 10px !important;
  border-radius: 8px;
  font-size: 11.75px !important;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

#metabox-button-click-dialog .wordai-actions-row .dashicons,
#metabox-button-click-dialog .wordai-actions-row .button i,
#metabox-button-click-dialog .wordai-prompt-builder-actions .dashicons,
#metabox-button-click-dialog .wordai-prompt-assistant-upgrade .dashicons {
  width: 14px;
  height: 14px;
  font-size: 14px;
  line-height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
}

#metabox-button-click-dialog .wordai-prompt-assistant-panel[hidden] {
  display: none !important;
}

#metabox-button-click-dialog .wordai-prompt-assistant-panel {
  padding: 14px;
  border: 1px solid #d6e2ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#metabox-button-click-dialog .wordai-prompt-assistant-panel,
#metabox-button-click-dialog .wordai-prompt-assistant-panel * {
  box-sizing: border-box;
}

#metabox-button-click-dialog .wordai-prompt-assistant-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#metabox-button-click-dialog .wordai-prompt-assistant-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

#metabox-button-click-dialog .wordai-prompt-assistant-title {
  display: block;
  color: #172033;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

#metabox-button-click-dialog .wordai-prompt-assistant-head h5 {
  margin: 0;
  color: #172033;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
}

#metabox-button-click-dialog .wordai-prompt-assistant-copy {
  display: block;
  margin-top: 4px;
  color: #526070;
  font-size: 12px;
  line-height: 1.45;
}

#metabox-button-click-dialog .wordai-prompt-assistant-head p {
  margin: 4px 0 0;
  color: #526070;
  font-size: 12px;
  line-height: 1.45;
}

#metabox-button-click-dialog .wordai-prompt-assistant-upgrade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 11px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

#metabox-button-click-dialog .wordai-prompt-assistant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

#metabox-button-click-dialog .wordai-prompt-assistant-column {
  min-width: 0;
}

#metabox-button-click-dialog .wordai-prompt-builder {
  min-width: 0;
  overflow: hidden;
}

#metabox-button-click-dialog .wordai-prompt-assistant-label {
  display: block;
  margin-bottom: 8px;
  color: #243044;
  font-size: 12px;
  font-weight: 800;
}

#metabox-button-click-dialog .wordai-prompt-template-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#metabox-button-click-dialog .wordai-prompt-template-card {
  min-height: 72px;
  padding: 10px;
  border: 1px solid #d9e3ee;
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

#metabox-button-click-dialog .wordai-prompt-template-card:hover,
#metabox-button-click-dialog .wordai-prompt-template-card:focus {
  border-color: #60a5fa;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.11);
  transform: translateY(-1px);
}

#metabox-button-click-dialog .wordai-prompt-template-card.is-locked {
  background: #f8fafc;
  color: #64748b;
}

#metabox-button-click-dialog .wordai-prompt-template-name,
#metabox-button-click-dialog .wordai-prompt-template-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: #172033;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

#metabox-button-click-dialog .wordai-prompt-template-card.is-locked .wordai-prompt-template-name,
#metabox-button-click-dialog .wordai-prompt-template-card.is-locked .wordai-prompt-template-title {
  color: #526070;
}

#metabox-button-click-dialog .wordai-prompt-template-tier,
#metabox-button-click-dialog .wordai-prompt-template-badge {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.3;
}

#metabox-button-click-dialog .wordai-prompt-template-card.is-locked .wordai-prompt-template-tier,
#metabox-button-click-dialog .wordai-prompt-template-card.is-locked .wordai-prompt-template-badge {
  background: #fff7ed;
  color: #9a3412;
}

#metabox-button-click-dialog .wordai-prompt-template-desc {
  display: block;
  color: #5b6777;
  font-size: 11px;
  line-height: 1.4;
}

#metabox-button-click-dialog .wordai-prompt-builder-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  min-width: 0;
}

#metabox-button-click-dialog .wordai-prompt-builder-field,
#metabox-button-click-dialog .wordai-prompt-builder-fields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

#metabox-button-click-dialog .wordai-prompt-builder-field label,
#metabox-button-click-dialog .wordai-prompt-builder-fields label span {
  color: #3b4655;
  font-size: 11px;
  font-weight: 800;
}

#metabox-button-click-dialog .wordai-prompt-builder-field input,
#metabox-button-click-dialog .wordai-prompt-builder-preview {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-color: #cbd8e6;
  border-radius: 8px;
  box-shadow: none;
}

#metabox-button-click-dialog .wordai-prompt-builder-field input {
  min-height: 34px;
}

#metabox-button-click-dialog .wordai-prompt-builder-input--missing {
  border-color: #f59e0b !important;
  background: #fffaf0 !important;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.14) !important;
}

#metabox-button-click-dialog .wordai-prompt-builder-field.is-disabled,
#metabox-button-click-dialog .wordai-prompt-builder-fields label.is-pro-field {
  opacity: 0.72;
}

#metabox-button-click-dialog .wordai-prompt-builder-field.is-disabled input,
#metabox-button-click-dialog .wordai-prompt-builder-fields label.is-pro-field input {
  background: #f3f4f6;
  color: #7b8794;
  cursor: not-allowed;
}

#metabox-button-click-dialog .wordai-prompt-builder-field.is-wide,
#metabox-button-click-dialog .wordai-prompt-builder-preview-wrap {
  grid-column: 1 / -1;
}

#metabox-button-click-dialog .wordai-prompt-pro-chip {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.4;
}

#metabox-button-click-dialog .wordai-prompt-builder-preview {
  min-height: 70px;
  margin-top: 8px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.45;
}

#metabox-button-click-dialog .wordai-prompt-builder-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

#metabox-button-click-dialog .wordai-prompt-builder-insert.is-attention {
  border-color: #0ea5e9 !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16), 0 10px 22px rgba(14, 165, 233, 0.18);
}

#metabox-button-click-dialog .wordai-prompt-assistant-notice {
  display: inline-flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  font-weight: 700;
  line-height: 1.45;
}

#metabox-button-click-dialog .wordai-prompt-assistant-notice--info {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

#metabox-button-click-dialog .wordai-content-modal-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px;
  backdrop-filter: blur(6px);
}

#metabox-button-click-dialog .wordai-options-grid {
  position: static;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

#metabox-button-click-dialog .wordai-card {
  min-width: 0;
  padding: 14px 15px;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #d9e2ec;
  box-shadow: none;
}

#metabox-button-click-dialog .wordai-card-header {
  margin-bottom: 10px;
}

#metabox-button-click-dialog .wave-animation-row {
  padding: 14px 18px;
  box-sizing: border-box;
  min-height: 116px;
  overflow: visible;
}

#metabox-button-click-dialog .wordai-results-shell {
  padding: 22px 18px 18px;
}

#metabox-button-click-dialog .wordai-results-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}

#metabox-button-click-dialog .wordai-results-nav[hidden] {
  display: none !important;
}

#metabox-button-click-dialog .wordai-results-nav-btn[hidden] {
  display: none !important;
}

#metabox-button-click-dialog .wordai-results-nav-btn {
  height: auto;
  min-height: 48px;
  max-width: 142px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
  padding: 8px 12px !important;
  border-radius: 999px;
  box-shadow: none;
}

#metabox-button-click-dialog .wordai-results-nav-btn.is-active {
  background: linear-gradient(135deg, #1f6feb 0%, #0e5ec9 100%) !important;
  border-color: #1f6feb !important;
  color: #fff !important;
}

#metabox-button-click-dialog .wordai-results-nav-btn.is-loading,
#metabox-button-click-dialog .wordai-results-nav-btn.is-active.is-loading {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  border-color: #d97706 !important;
  color: #fff !important;
}

#metabox-button-click-dialog .wordai-results-nav-btn.is-success,
#metabox-button-click-dialog .wordai-results-nav-btn.is-active.is-success {
  background: linear-gradient(135deg, #22a35a 0%, #16803a 100%) !important;
  border-color: #16803a !important;
  color: #fff !important;
}

#metabox-button-click-dialog .wordai-results-nav-btn.is-error,
#metabox-button-click-dialog .wordai-results-nav-btn.is-active.is-error {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  border-color: #b91c1c !important;
  color: #fff !important;
}

#metabox-button-click-dialog .wordai-results-nav-label {
  display: block;
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
  white-space: normal;
}

#metabox-button-click-dialog .wordai-results-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  background: rgba(100, 111, 121, 0.12);
  color: #4b5660;
}

#metabox-button-click-dialog .wordai-results-nav-btn.is-queued .wordai-results-nav-badge {
  background: rgba(100, 111, 121, 0.14);
  color: #50575e;
}

#metabox-button-click-dialog .wordai-results-nav-btn.is-loading .wordai-results-nav-badge {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

#metabox-button-click-dialog .wordai-results-nav-btn.is-success .wordai-results-nav-badge {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

#metabox-button-click-dialog .wordai-results-nav-btn.is-error .wordai-results-nav-badge {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

#metabox-button-click-dialog .wordai-results-panels {
  min-height: 240px;
}

#metabox-button-click-dialog .wordai-result-panel {
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #fbfdff;
}

#metabox-button-click-dialog .wordai-result-panel.is-queued {
  border-color: rgba(100, 111, 121, 0.22);
}

#metabox-button-click-dialog .wordai-result-panel.is-loading {
  border-color: rgba(34, 113, 177, 0.28);
  box-shadow: 0 16px 32px rgba(34, 113, 177, 0.1);
}

#metabox-button-click-dialog .wordai-result-panel.is-success {
  border-color: rgba(0, 163, 42, 0.18);
}

#metabox-button-click-dialog .wordai-result-panel.is-error {
  border-color: rgba(214, 54, 56, 0.24);
  box-shadow: 0 14px 28px rgba(214, 54, 56, 0.08);
}

#metabox-button-click-dialog .wordai-result-inline-error {
  margin: 6px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(214, 54, 56, 0.28);
  border-radius: 10px;
  background: #fff5f5;
  color: #8a2424;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

#metabox-button-click-dialog .wordai-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

#metabox-button-click-dialog .wordai-result-panel h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

#metabox-button-click-dialog .wordai-result-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  background: rgba(100, 111, 121, 0.12);
  color: #50575e;
}

#metabox-button-click-dialog .wordai-result-panel.is-queued .wordai-result-status {
  background: rgba(100, 111, 121, 0.14);
  color: #50575e;
}

#metabox-button-click-dialog .wordai-result-panel.is-loading .wordai-result-status {
  background: #d97706;
  color: #fff;
}

#metabox-button-click-dialog .wordai-result-panel.is-success .wordai-result-status {
  background: #16803a;
  color: #fff;
}

#metabox-button-click-dialog .wordai-result-panel.is-error .wordai-result-status {
  background: #b91c1c;
  color: #fff;
}

#metabox-button-click-dialog .wordai-result-panel--inactive {
  display: none !important;
}

#metabox-button-click-dialog .sc-wordai-generated-content {
  min-height: 320px;
}

#metabox-button-click-dialog .sc-wordai-generated-image-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
}

#metabox-button-click-dialog .wordai-generated-image-thumb {
  position: relative;
  display: block;
  width: 100%;
  min-height: 220px;
  padding: 0;
  border: 1px solid #d9e4ee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 64, 96, 0.12);
}

#metabox-button-click-dialog .wordai-generated-image-thumb img {
  display: block;
  width: 100%;
  height: clamp(220px, 32vw, 320px);
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

#metabox-button-click-dialog .wordai-generated-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  background: rgba(15, 45, 65, 0.68);
  opacity: 0;
  transition: opacity 0.18s ease;
}

#metabox-button-click-dialog .wordai-generated-image-thumb:hover .wordai-generated-image-overlay,
#metabox-button-click-dialog .wordai-generated-image-thumb:focus .wordai-generated-image-overlay {
  opacity: 1;
}

#metabox-button-click-dialog .wordai-generated-image-thumb.is-featured {
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.16), 0 12px 24px rgba(15, 64, 96, 0.14);
}

#metabox-button-click-dialog .wordai-generated-image-thumb.is-featured::after {
  content: "Featured image";
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  background: #15803d;
  box-shadow: 0 8px 14px rgba(21, 128, 61, 0.24);
}

#metabox-button-click-dialog .wordai-generated-image-thumb.is-updating {
  cursor: wait;
  opacity: 0.78;
}

#metabox-button-click-dialog .sc-wordai-save-to-gallery-row {
  margin-top: 10px;
}

/* Compact content generation modal refinements */
.ui-dialog.sc-wordai-content-dialog .ui-dialog-titlebar {
  cursor: move;
  padding-left: 52px !important;
}

.ui-dialog.sc-wordai-content-dialog .ui-dialog-titlebar-close {
  cursor: pointer;
}

.ui-dialog.sc-wordai-content-dialog .ui-dialog-title {
  max-width: calc(100% - 190px);
}

.ui-dialog.sc-wordai-content-dialog .wordai-dialog-drag-hint {
  position: absolute;
  left: 14px;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  opacity: 0.88;
  pointer-events: none;
}

.ui-dialog.sc-wordai-content-dialog .wordai-dialog-drag-hint .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
}

#metabox-button-click-dialog .wordai-content-modal-shell {
  gap: 12px;
}

.ui-dialog.sc-wordai-content-dialog .ui-dialog-content {
  padding: 14px 14px 16px !important;
}

#metabox-button-click-dialog .wordai-content-modal-top {
  padding: 12px 14px;
}

#metabox-button-click-dialog .wordai-prompt-section {
  gap: 8px;
}

#metabox-button-click-dialog .wordai-prompt-hints-label {
  margin: 0;
  font-size: 13px;
  line-height: 1.25;
}

#metabox-button-click-dialog .prompt-alert-msg {
  margin-bottom: 6px;
  gap: 5px;
}

#metabox-button-click-dialog .prompt-alert-msg .alert-success,
#metabox-button-click-dialog .prompt-alert-msg .alert-error,
#metabox-button-click-dialog .prompt-alert-msg .alert-remind {
  padding: 6px 9px;
  font-size: 12px;
  line-height: 1.35;
}

#metabox-button-click-dialog .scwordai-prompt {
  padding: 10px 12px;
  font-size: 14px;
}

#metabox-button-click-dialog textarea.scwordai-prompt {
  min-height: 104px;
  line-height: 1.45;
}

#metabox-button-click-dialog .wordai-actions-row {
  gap: 7px;
  margin-top: 0;
}

#metabox-button-click-dialog .wordai-actions-row .button,
#metabox-button-click-dialog .wordai-prompt-builder-actions .button {
  min-height: 30px;
  height: 30px;
  padding: 0 10px !important;
  font-size: 11.75px !important;
}

#metabox-button-click-dialog .wordai-prompt-assistant-panel {
  padding: 11px;
}

#metabox-button-click-dialog .wordai-prompt-assistant-head {
  gap: 10px;
  margin-bottom: 10px;
}

#metabox-button-click-dialog .wordai-prompt-assistant-head h5 {
  font-size: 14px;
}

#metabox-button-click-dialog .wordai-prompt-assistant-head p,
#metabox-button-click-dialog .wordai-prompt-template-desc {
  font-size: 11px;
  line-height: 1.35;
}

#metabox-button-click-dialog .wordai-prompt-template-list {
  gap: 7px;
}

#metabox-button-click-dialog .wordai-prompt-template-card {
  min-height: 62px;
  padding: 8px;
}

#metabox-button-click-dialog .wordai-prompt-template-title {
  margin-bottom: 4px;
  font-size: 11px;
}

#metabox-button-click-dialog .wordai-prompt-builder-fields {
  gap: 7px;
}

#metabox-button-click-dialog .wordai-prompt-builder-field input,
#metabox-button-click-dialog .wordai-prompt-builder-fields label input {
  min-height: 31px;
  font-size: 12px;
}

#metabox-button-click-dialog .wordai-prompt-builder-preview {
  min-height: 56px;
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.4;
}

#metabox-button-click-dialog .wordai-prompt-builder-actions {
  margin-top: 8px;
}

#metabox-button-click-dialog .wordai-content-modal-toolbar {
  padding: 10px;
}

#metabox-button-click-dialog .wordai-options-grid {
  gap: 9px;
}

#metabox-button-click-dialog .wordai-card {
  padding: 10px 12px;
  border-radius: 12px;
}

#metabox-button-click-dialog .wordai-card-header {
  margin: 0 0 7px;
  font-size: 13px;
  line-height: 1.25;
}

#metabox-button-click-dialog .wordai-checkbox-group label {
  font-size: 12px;
  line-height: 1.3;
}

#metabox-button-click-dialog .sc-wordai-items-label {
  font-size: 12px;
}

#metabox-button-click-dialog .wordai-tier-option-hint {
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.35;
}

#metabox-button-click-dialog .wordai-results-shell {
  padding: 14px;
}

#metabox-button-click-dialog .wordai-results-nav {
  gap: 6px;
  margin: 0 0 12px;
}

#metabox-button-click-dialog .wordai-results-nav-btn {
  min-height: 38px;
  max-width: 126px;
  gap: 3px;
  padding: 6px 10px !important;
}

#metabox-button-click-dialog .wordai-results-nav-label {
  font-size: 11px;
}

#metabox-button-click-dialog .wordai-results-nav-badge {
  padding: 2px 7px;
  font-size: 9px;
}

#metabox-button-click-dialog .wordai-results-panels {
  min-height: 190px;
}

#metabox-button-click-dialog .wordai-result-panel {
  padding: 12px;
  border-radius: 12px;
}

#metabox-button-click-dialog .wordai-result-header {
  margin-bottom: 9px;
}

#metabox-button-click-dialog .wordai-result-panel h5 {
  font-size: 13px;
}

#metabox-button-click-dialog .wordai-result-status {
  padding: 4px 8px;
  font-size: 10px;
}

#metabox-button-click-dialog .sc-wordai-generated-content {
  min-height: 260px;
}

@media (max-width: 782px) {
  .ui-dialog.sc-wordai-content-dialog .wordai-dialog-drag-hint {
    display: none;
  }

  .ui-dialog.sc-wordai-content-dialog .ui-dialog-titlebar {
    padding-left: 16px !important;
  }

  .ui-dialog.sc-wordai-content-dialog .ui-dialog-title {
    max-width: calc(100% - 170px);
  }

  #metabox-button-click-dialog .wordai-options-grid {
    grid-template-columns: 1fr;
  }
}

#metabox-button-click-dialog .wordai-result-panel.is-error .sc-wordai-save-to-gallery-row {
  display: none !important;
}

button.button.button-primary.button-large.metabox-content-writer-btn {
  border-radius: 12px !important;
  padding: 10px 14px !important;
  min-height: 50px !important;
  background: linear-gradient(135deg, #0f68a4 0%, #1989d4 100%) !important;
  border-color: rgba(22, 104, 155, 0.35) !important;
  box-shadow: 0 14px 26px rgba(21, 110, 169, 0.22) !important;
}

button.button.button-primary.button-large.metabox-content-writer-btn:hover,
button.button.button-primary.button-large.metabox-content-writer-btn:focus {
  transform: translateY(-1px);
  box-shadow: 0 18px 30px rgba(21, 110, 169, 0.28) !important;
  filter: saturate(1.05);
}

button.button.button-primary.button-large.metabox-content-writer-btn:active {
  transform: translateY(0);
  box-shadow: 0 10px 18px rgba(21, 110, 169, 0.22) !important;
}

@media (max-width: 1180px) {
  #metabox-button-click-dialog .wordai-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .wordai-modal-section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .wordai-modal-section-note {
    text-align: left;
  }

  #metabox-button-click-dialog .wordai-options-grid {
    grid-template-columns: 1fr;
  }

  #metabox-button-click-dialog .wordai-prompt-assistant-head {
    flex-direction: column;
  }

  #metabox-button-click-dialog .wordai-prompt-assistant-grid,
  #metabox-button-click-dialog .wordai-prompt-template-list,
  #metabox-button-click-dialog .wordai-prompt-builder-fields {
    grid-template-columns: 1fr;
  }

  #suggest-titles-button-click-dialog .wordai-suggest-modal-actions,
  #suggest-titles-button-click-dialog .wordai-suggest-results-footer {
    align-items: stretch;
  }

  .ui-dialog.sc-wordai-content-dialog .wordai-dialog-progress {
    position: static;
    transform: none;
    margin: 8px 0 0;
  }

  .ui-dialog.sc-wordai-content-dialog .ui-dialog-titlebar {
    padding-right: 48px;
    padding-bottom: 12px;
    flex-wrap: wrap;
  }

  .ui-dialog.sc-wordai-content-dialog .ui-dialog-title {
    max-width: 100%;
  }
}

.wordai-tier-inline-notice {
  margin: 0 15px 15px !important;
  border-left-width: 4px !important;
  border-left-color: #1f6feb !important;
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%) !important;
}

.wordai-tier-inline-notice p {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 !important;
}

.wordai-tier-inline-cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px;
  border-radius: 999px !important;
  padding-inline: 12px !important;
  min-height: 30px !important;
  line-height: 1.2 !important;
}

.wordai-tier-inline-notice-agent {
  margin-bottom: 18px !important;
}

@media (max-width: 782px) {
  .wordai-tier-inline-notice p {
    align-items: flex-start;
  }
}


/* WordAI documentation link in admin headers */
.sc-wordai-docs-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:32px;
  padding:7px 12px;
  border:1px solid rgba(37,99,235,.18);
  border-radius:999px;
  background:linear-gradient(180deg,#ffffff 0%,#eef4ff 100%);
  color:#1d3f9b;
  font-family:"Poppins","Segoe UI",sans-serif;
  font-size:12px;
  font-weight:800;
  line-height:1;
  text-decoration:none;
  box-shadow:0 8px 20px rgba(37,99,235,.12), inset 0 1px 0 rgba(255,255,255,.85);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.sc-wordai-docs-link:hover,
.sc-wordai-docs-link:focus{
  border-color:rgba(37,99,235,.35);
  color:#0f2f8f;
  transform:translateY(-1px);
  box-shadow:0 12px 26px rgba(37,99,235,.18), inset 0 1px 0 rgba(255,255,255,.9);
}

.sc-wordai-docs-link .dashicons{
  width:16px;
  height:16px;
  font-size:16px;
  line-height:16px;
}
