/* =========================================================================
   ASKANY AI — ADMIN SETTINGS REDESIGN
   Scoped under .askany-settings-wrap for full WordPress admin compatibility.
   Based on the AskAny UI Design System (UI Files)
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

.askany-settings-wrap,
.askany-modal {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --primary-darker: #3730A3;
  --primary-light: #EEF2FF;
  --accent: #7C3AED;
  --accent-light: #F5F3FF;

  --success: #16A34A;
  --success-light: #F0FDF4;
  --success-border: #BBF7D0;
  --danger: #DC2626;
  --danger-light: #FEF2F2;
  --danger-border: #FECACA;
  --warning: #D97706;
  --warning-light: #FFFBEB;
  --warning-border: #FDE68A;
  --info: #0284C7;
  --info-light: #F0F9FF;
  --info-border: #BAE6FD;

  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --border: #E2E8F0;
  --border-light: #F1F5F9;

  --text: #0F172A;
  --text-muted: #64748B;
  --text-faint: #94A3B8;
  --text-on-primary: #FFFFFF;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms var(--ease);
  --t: 220ms var(--ease);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
}

.askany-settings-wrap {
  margin: 20px auto 40px auto;
  max-width: 1280px;
}

.askany-settings-wrap.askany-live-chat-wrap,
.askany-live-chat-wrap {
  max-width: none !important;
  width: calc(100% - 20px) !important;
  margin: 15px 20px 30px 0 !important;
}

.askany-settings-wrap *,
.askany-settings-wrap *::before,
.askany-settings-wrap *::after {
  box-sizing: border-box;
}

/* =========================================================================
   PAGE HEADER & ACTION BAR
   ========================================================================= */
.askany-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.askany-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.askany-page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.askany-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.askany-page-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0;
  max-width: 720px;
}

.askany-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */
.askany-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
}

.askany-btn:hover {
  text-decoration: none;
}

.askany-btn:active {
  transform: scale(0.98);
}

.askany-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

.askany-btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}

.askany-btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.askany-btn-secondary:hover {
  background: var(--surface-2);
  border-color: #CBD5E1;
}

.askany-btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  gap: 6px;
}

.askany-btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.askany-btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.askany-btn-danger-outline {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

.askany-btn-danger-outline:hover {
  background: #FEE2E2;
}

.askany-btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* =========================================================================
   TABS NAVIGATION
   ========================================================================= */
.askany-tabs-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding: 0 4px;
  margin-bottom: 22px;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.askany-tab-item,
#wpcontent .askany-settings-wrap .askany-tab-item,
.askany-settings-wrap div.askany-tab-item,
.askany-settings-wrap button.askany-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  border-radius: 0;
  transition: color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  user-select: none;
  box-shadow: none;
  outline: none;
  flex-shrink: 0;
}

.askany-tab-item:hover,
#wpcontent .askany-settings-wrap .askany-tab-item:hover {
  color: var(--text);
  background: transparent;
  border-bottom-color: transparent;
}

.askany-tab-item.active,
#wpcontent .askany-settings-wrap .askany-tab-item.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  background: transparent;
  box-shadow: none;
}

.askany-tab-item .askany-tab-icon {
  width: 17px;
  height: 17px;
  color: currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.askany-tab-item .askany-tab-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.askany-tab-item.active .askany-tab-badge {
  background: var(--primary-light);
  color: var(--primary-dark);
}

@media (max-width: 992px) {
  .askany-tabs-nav {
    gap: 3px;
  }

  .askany-tab-item,
  #wpcontent .askany-settings-wrap .askany-tab-item,
  .askany-settings-wrap div.askany-tab-item,
  .askany-settings-wrap button.askany-tab-item {
    padding: 10px 12px;
    font-size: 13px;
    gap: 6px;
  }
}

@media (max-width: 768px) {
  .askany-tabs-nav {
    gap: 2px;
    margin-bottom: 18px;
  }

  .askany-tab-item,
  #wpcontent .askany-settings-wrap .askany-tab-item,
  .askany-settings-wrap div.askany-tab-item,
  .askany-settings-wrap button.askany-tab-item {
    padding: 9px 10px;
    font-size: 12.5px;
    gap: 5px;
  }

  .askany-tab-item .askany-tab-icon {
    width: 15px;
    height: 15px;
  }
}

/* Tab Panels */
.askany-tab-pane {
  display: none;
  animation: askanyFadeIn var(--t) both;
  padding-top: 22px;
}

.askany-tab-pane.active {
  display: block;
}

@keyframes askanyFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================================
   CARDS & GRIDS
   ========================================================================= */
.askany-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.askany-card:hover {
  border-color: #CBD5E1;
}

.askany-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
  background: var(--surface);
}

.askany-card-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.askany-card-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.askany-card-icon.blue {
  background: var(--primary-light);
  color: var(--primary);
}

.askany-card-icon.purple {
  background: var(--accent-light);
  color: var(--accent);
}

.askany-card-icon.green {
  background: var(--success-light);
  color: var(--success);
}

.askany-card-icon.amber {
  background: var(--warning-light);
  color: var(--warning);
}

.askany-card-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.askany-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.askany-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.askany-card-body {
  padding: 22px 24px;
}

.askany-card-footer {
  padding: 14px 24px;
  background: var(--surface-2);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.askany-grid {
  display: grid;
  gap: 20px;
}

.askany-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.askany-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.askany-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.askany-grid-main-side {
  grid-template-columns: 1.8fr 1fr;
  align-items: start;
}

@media (max-width: 1100px) {
  .askany-grid-main-side {
    grid-template-columns: 1fr;
  }

  .askany-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {

  .askany-grid-2,
  .askany-grid-3,
  .askany-grid-4 {
    grid-template-columns: 1fr;
  }

  .askany-header-bar {
    padding: 18px;
  }
}

/* =========================================================================
   STATISTICS CARDS & METERS
   ========================================================================= */
.askany-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), border-color var(--t-fast);
}

.askany-stat-card:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
}

.askany-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.askany-stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.askany-stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.askany-stat-sub {
  font-size: 11.5px;
  color: var(--text-faint);
}

.askany-progress-wrap {
  margin: 12px 0 16px;
}

.askany-progress-track {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-light);
  overflow: hidden;
}

.askany-progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--primary);
  transition: width 0.4s ease;
}

.askany-progress-bar.success {
  background: var(--success);
}

/* Stats Mini Table / List */
.askany-stat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.askany-stat-item-pill {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
}

.askany-stat-item-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.askany-stat-item-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-top: 3px;
}

/* =========================================================================
   FORM ELEMENTS
   ========================================================================= */
.askany-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

@media (max-width: 768px) {
  .askany-form-row {
    grid-template-columns: 1fr;
  }
}

.askany-form-group {
  margin-bottom: 18px;
}

.askany-form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.askany-form-label .required {
  color: var(--danger);
  font-weight: 700;
}

.askany-form-input,
.askany-form-select,
.askany-form-textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  height: 38px;
  outline: none;
}

.askany-form-textarea {
  height: auto;
  min-height: 90px;
  resize: vertical;
  line-height: 1.55;
  font-family: inherit;
}

.askany-form-input:focus,
.askany-form-select:focus,
.askany-form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.askany-form-input::placeholder,
.askany-form-textarea::placeholder {
  color: var(--text-faint);
}

.askany-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 36px;
  cursor: pointer;
}

.askany-form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* Input Group (Input + Buttons appended) */
.askany-input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.askany-input-group .askany-form-input {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  flex: 1;
}

.askany-input-group-btn {
  padding: 0 14px;
  border: 1px solid var(--border);
  border-left: none;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.askany-input-group-btn:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.askany-input-group-btn:hover {
  background: #E2E8F0;
  color: var(--text);
}

/* =========================================================================
   MODERN TOGGLE SWITCHES
   ========================================================================= */
.askany-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.askany-toggle-row:last-child {
  border-bottom: none;
}

.askany-toggle-info {
  flex: 1;
}

.askany-toggle-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.askany-toggle-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.5;
}

.askany-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.askany-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.askany-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #CBD5E1;
  border-radius: var(--radius-full);
  transition: background-color var(--t-fast);
}

.askany-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform var(--t-fast);
}

.askany-switch input:checked+.askany-slider {
  background-color: var(--primary);
}

.askany-switch input:checked+.askany-slider::before {
  transform: translateX(18px);
}

.askany-switch input:focus-visible+.askany-slider {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.askany-switch input:disabled+.askany-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================================================================
   RADIO CARDS (Web Search & Retrieval Modes)
   ========================================================================= */
.askany-radio-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
  margin-bottom: 10px;
  background: var(--surface);
}

.askany-radio-card:hover {
  border-color: #C7D2FE;
  background: var(--surface-2);
}

.askany-radio-card.selected,
.askany-radio-card:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.askany-radio-card input[type="radio"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.askany-radio-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.askany-radio-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.5;
}

/* =========================================================================
   SPEED SELECTOR PILLS
   ========================================================================= */
.askany-pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.askany-pill-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: all var(--t-fast);
}

.askany-pill-btn:hover {
  border-color: #CBD5E1;
  background: var(--surface-2);
}

.askany-pill-btn:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

.askany-pill-btn input[type="radio"] {
  margin: 0;
  accent-color: var(--primary);
}

.askany-pill-btn-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.askany-pill-btn-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* =========================================================================
   BADGES & TAGS
   ========================================================================= */
.askany-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  line-height: 1.3;
}

.askany-tag-pro {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  box-shadow: 0 1px 2px rgba(217, 119, 6, 0.3);
}

.askany-tag-new {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #C7D2FE;
}

.askany-tag-beta {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid #DDD6FE;
}

/* =========================================================================
   HINTS, ALERTS & INFO BOXES
   ========================================================================= */
.askany-alert {
  display: flex;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 12px 0;
}

.askany-alert-info {
  background: var(--info-light);
  border-color: var(--info-border);
  color: #0369A1;
}

.askany-alert-warning {
  background: var(--warning-light);
  border-color: var(--warning-border);
  color: #92400E;
}

.askany-alert-success {
  background: var(--success-light);
  border-color: var(--success-border);
  color: #15803D;
}

.askany-hint-box {
  margin-top: 10px;
  padding: 12px 15px;
  background: var(--surface-2);
  border-left: 3px solid var(--primary);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
}

.askany-hint-box p {
  margin: 0 0 6px 0;
}

.askany-hint-box p:last-child {
  margin-bottom: 0;
}

/* =========================================================================
   SHORTCODE & CODE BLOCKS
   ========================================================================= */
.askany-code-box {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--primary-darker);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.askany-code-box code {
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  word-break: break-all;
}

.askany-attr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin-top: 12px;
}

.askany-attr-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.askany-attr-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
}

.askany-attr-table tr:last-child td {
  border-bottom: none;
}

/* Avatar & Media Previews */
.askany-media-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.askany-media-preview-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

/* Status indicator dot */
.askany-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.askany-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-light);
}

/* Floating Save Settings bar (mobile or scrolled) */
.askany-floating-save-bar {
  position: sticky;
  bottom: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  /* border-radius: var(--radius-lg); */
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 20;
  margin-top: 24px;
}

.askany-floating-save-bar .askany-save-status {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================================
   LIVE CHAT MANAGEMENT
   ========================================================================= */

/* Top Statistics Container & Grid */
.askany-live-chat-wrap .askany-stats-container {
  margin-bottom: 22px;
}

.askany-live-chat-wrap .askany-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

@media (max-width: 1200px) {
  .askany-live-chat-wrap .askany-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .askany-live-chat-wrap .askany-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .askany-live-chat-wrap .askany-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Stat Cards (Vertical, Left-Aligned, Clean Modern Design) */
.askany-live-chat-wrap .askany-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}

.askany-live-chat-wrap .askany-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.askany-live-chat-wrap .askany-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--primary);
}

.askany-live-chat-wrap .askany-stat-icon.blue {
  background: var(--primary-light);
  color: var(--primary);
}

.askany-live-chat-wrap .askany-stat-icon.amber {
  background: var(--warning-light);
  color: var(--warning);
}

.askany-live-chat-wrap .askany-stat-icon.purple {
  background: var(--accent-light);
  color: var(--accent);
}

.askany-live-chat-wrap .askany-stat-icon.green {
  background: var(--success-light);
  color: var(--success);
}

.askany-live-chat-wrap .askany-stat-icon.active {
  background: var(--warning-light);
  color: var(--warning);
}

.askany-live-chat-wrap .askany-stat-icon.ai {
  background: var(--accent-light);
  color: var(--accent);
}

.askany-live-chat-wrap .askany-stat-icon.agent {
  background: var(--success-light);
  color: var(--success);
}

.askany-live-chat-wrap .askany-stat-value,
.askany-live-chat-wrap .askany-stat-number {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.15;
}

.askany-live-chat-wrap .askany-stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0;
}

/* Chat 3-Column Layout Container */
.askany-live-chat-wrap .askany-chat-container {
  display: flex;
  height: 680px;
  max-height: calc(100vh - 240px);
  min-height: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
  isolation: isolate;
  margin-top: 0;
}

/* Column 1: Chat Sessions Sidebar */
.askany-live-chat-wrap .askany-chat-sidebar {
  width: 300px;
  flex: 0 0 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.askany-live-chat-wrap .askany-sidebar-header {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  background: var(--surface);
}

.askany-live-chat-wrap .askany-sidebar-header h3 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.askany-sidebar-count-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.askany-live-chat-wrap .askany-sessions-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.askany-no-sessions {
  padding: 30px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Session Item */
.askany-session-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--t-fast);
  position: relative;
  text-decoration: none;
}

.askany-session-item:hover {
  background: var(--surface-2);
}

.askany-session-item.active {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  padding-left: 15px;
}

.askany-session-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.askany-session-user {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.askany-unread-count {
  background: var(--primary);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  line-height: 1.3;
}

.askany-session-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.askany-session-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

/* Status Badges / Tags */
.askany-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

.askany-status-badge.ai {
  background: #F5F3FF;
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}

.askany-status-badge.agent {
  background: #F0FDF4;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.askany-status-badge.waiting {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

/* Pro Badge */
.askany-pro-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 800;
  background: linear-gradient(135deg, #7C3AED, #4F46E5);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  margin-right: 6px;
  flex-shrink: 0;
}

/* Session Actions (Clear Chat History & Delete User Session) */
.askany-session-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--t-fast);
  flex-shrink: 0;
}

.askany-session-item:hover .askany-session-actions,
.askany-session-item.active .askany-session-actions {
  opacity: 1;
}

.askany-action-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  padding: 0;
}

.askany-action-btn:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

/* Column 2: Chat Main Area */
.askany-live-chat-wrap .askany-chat-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

/* Chat Header */
.askany-live-chat-wrap .askany-chat-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-shrink: 0;
  background: var(--surface);
  min-height: 60px;
  min-width: 0;
}

.askany-live-chat-wrap .askany-chat-user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 14px;
  flex-wrap: nowrap;
  min-width: 0;
}

/* Chat Header User with Avatar & Email */
.askany-chat-header-user {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.askany-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
  user-select: none;
}

.askany-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.askany-user-meta-header {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.askany-user-meta-header h3,
#askany-current-user-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.askany-current-user-email {
  font-size: 11.5px;
  color: var(--text-faint);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.askany-live-chat-wrap .askany-chat-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex: 0 0 auto;
  min-width: 0;
}

.askany-live-chat-wrap .askany-chat-controls select {
  height: 34px;
  min-height: 34px;
  width: auto;
  max-width: 170px;
  padding: 0 30px 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background-color: var(--surface-2);
  color: var(--text);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.askany-live-chat-wrap .askany-chat-controls .askany-btn {
  flex-shrink: 0;
  white-space: nowrap;
  margin-top: -4px;
}

/* Messages Stream */
.askany-live-chat-wrap .askany-chat-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--surface-2);
}

/* Empty State Hero */
.askany-no-chat-selected {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 24px;
  text-align: center;
}

.askany-empty-hero {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.askany-empty-icon-wrap {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.12);
}

.askany-empty-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.askany-empty-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 20px 0;
}

.askany-empty-features {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.askany-empty-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

/* Message Rows (matching .msg-row in UI Files) */
.askany-message {
  display: flex;
  gap: 9px;
  max-width: 82%;
  position: relative;
}

.askany-message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.askany-message.ai,
.askany-message.agent {
  align-self: flex-start;
}

.askany-message .message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
  overflow: hidden;
}

.askany-message.user .message-avatar {
  background: var(--text-muted);
}

.askany-message.ai .message-avatar {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.askany-message.agent .message-avatar {
  background: var(--success);
}

.askany-message .message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.askany-message .message-avatar svg {
  width: 16px;
  height: 16px;
}

/* Message Bubble Wrapper - Reset any admin.css styles so there is NO double-bubble */
.askany-live-chat-wrap .askany-message-bubble,
.askany-message-bubble {
  background: transparent;
  background-color: transparent;
  background-image: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.askany-message.user .askany-message-bubble {
  align-items: flex-end;
}

/* Message Content Bubble (matching .msg-bubble in UI Files) */
.askany-live-chat-wrap .askany-message-content,
.askany-message-content {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
  width: fit-content;
}

.askany-message.ai .askany-message-content,
.askany-message.agent .askany-message-content {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
}

.askany-message.user .askany-message-content {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  border-top-right-radius: 4px;
}

.askany-message.user .askany-message-content * {
  color: #ffffff;
}

.askany-message.user .askany-message-content a {
  color: #ffffff;
  text-decoration: underline;
}

/* Message Meta Timestamp (matching .msg-meta in UI Files) */
.askany-live-chat-wrap .askany-message-meta,
.askany-message-meta {
  font-size: 11px;
  color: var(--text-faint);
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  line-height: 1.3;
}

.askany-message.user .askany-message-meta {
  justify-content: flex-end;
  text-align: right;
}

.askany-system-notice {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-muted);
  margin: 6px 0;
}

/* Composer Area */
.askany-live-chat-wrap .askany-chat-input {
  padding: 12px 18px;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.askany-admin-attachments-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 0;
}

.askany-input-container {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
}

.askany-input-container textarea,
#askany-message-input {
  flex: 1;
  min-height: 48px;
  max-height: 130px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--surface);
  color: var(--text);
  padding: 9px 13px;
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  box-shadow: none;
}

.askany-input-container textarea:focus,
#askany-message-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.askany-input-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.askany-attach-btn,
.askany-expand-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  padding: 0;
}

.askany-attach-btn:hover,
.askany-expand-btn:hover {
  background: #E2E8F0;
  color: var(--text);
}

.askany-send-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
  padding: 0;
}

.askany-send-btn:hover {
  background: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}

/* Column 3: User Info & Attachments Panel */
.askany-live-chat-wrap .askany-info-panel {
  width: 300px;
  flex: 0 0 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  overflow-y: auto;
}

.askany-panel-section {
  border-bottom: 1px solid var(--border-light);
}

.askany-panel-header {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
}

.askany-panel-header h4 {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.askany-attachment-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.askany-user-info-content {
  padding: 0;
}

.askany-no-selection,
.askany-no-attachments {
  padding: 24px 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0;
}

/* User Details Panel (matching user-info-row in UI Files) */
.askany-user-details {
  display: flex;
  flex-direction: column;
}

.askany-info-item,
.askany-user-info-row {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.askany-info-item:last-child,
.askany-user-info-row:last-child {
  border-bottom: none;
}

.askany-info-label,
.askany-user-info-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 2px;
}

.askany-info-value,
.askany-user-info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  line-height: 1.4;
}

.askany-info-value a,
.askany-user-info-value a {
  color: var(--primary);
  text-decoration: none;
}

.askany-info-value a:hover,
.askany-user-info-value a:hover {
  text-decoration: underline;
}

.askany-session-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text);
  background: var(--surface-2);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  display: inline-block;
  width: fit-content;
}

.askany-ip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.askany-country {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 6px;
}

.askany-country img {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
}

/* Attachments Item List */
.askany-attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--t-fast);
}

.askany-attachment-item:hover {
  background: var(--surface-2);
}

.askany-attachment-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}

.askany-attachment-icon svg {
  width: 16px;
  height: 16px;
}

.askany-attachment-info {
  flex: 1;
  min-width: 0;
}

.askany-attachment-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.askany-attachment-meta {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 2px;
}

.askany-attachment-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.askany-attachment-download-btn,
.askany-attachment-delete-btn {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t-fast);
  padding: 0;
}

.askany-attachment-download-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: #C7D2FE;
}

.askany-attachment-delete-btn:hover {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger-border);
}

/* Modals (Large Editor & AI Review) */
.askany-modal {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.askany-modal[style*="display: none"] {
  display: none;
}

.askany-modal[style*="display: flex"],
.askany-modal[style*="display: block"],
.askany-modal.show {
  display: flex;
}

.askany-modal-content {
  background: #ffffff;
  background-color: #ffffff;
  color: #0F172A;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
  border: 1px solid #E2E8F0;
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  animation: askanyModalIn 150ms cubic-bezier(0.4, 0, 0.2, 1) ease-out;
}

.askany-large-editor-content {
  max-width: 860px;
  height: 75vh;
}

#askany-review-results-modal .askany-modal-content {
  max-width: 720px;
}

@keyframes askanyModalIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.askany-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  background-color: #FFFFFF;
  flex-shrink: 0;
}

.askany-modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
}

.askany-modal-close {
  background: transparent;
  border: none;
  font-size: 15px;
  line-height: 1;
  color: #64748B;
  cursor: pointer;
  padding: 0;
  transition: color 150ms ease;
}

.askany-modal-close:hover {
  color: #0F172A;
}

.askany-modal-body {
  padding: 22px 24px;
  overflow-y: auto;
  flex: 1 1 auto;
  background: #FFFFFF;
  background-color: #FFFFFF;
  color: #0F172A;
}

.askany-modal-body textarea,
#askany-large-message-input {
  width: 100%;
  height: 100%;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  background: #FFFFFF;
  color: #0F172A;
  box-sizing: border-box;
}

.askany-modal-body textarea:focus,
#askany-large-message-input:focus {
  border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  outline: none;
}

/* Modal Footer with solid background and full styling */
.askany-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
  background-color: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-shrink: 0;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

.askany-modal-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.askany-review-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.askany-review-original {
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  padding: 16px;
  background: #F8FAFC;
  background-color: #F8FAFC;
}

.askany-review-suggested {
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  padding: 16px;
  background: #F0FDF4;
  background-color: #F0FDF4;
}

.askany-review-original h4 {
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.askany-review-suggested h4 {
  margin: 0 0 10px 0;
  font-size: 12px;
  font-weight: 700;
  color: #16A34A;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.askany-review-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: #0F172A;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Responsive adjustments for 3-column chat console */
@media (max-width: 1100px) {
  .askany-live-chat-wrap .askany-info-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  .askany-live-chat-wrap .askany-chat-container {
    flex-direction: column;
    height: auto;
    max-height: none;
  }

  .askany-live-chat-wrap .askany-chat-sidebar {
    width: 100%;
    height: 260px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .askany-live-chat-wrap .askany-chat-main {
    border-right: none;
    height: 480px;
  }
}

/* =========================================================================
   END LIVE CHAT MANAGEMENT
   ========================================================================= */