/* Advanced Elementor Widgets — public styles
   No hardcoded brand colours. All colours via Elementor controls. */

/* ── Widget width fix ─────────────────────────────────────────────────────
   Elementor containers with align-items:center shrink-wrap their children.
   AEW widgets that rely on flex/grid expansion need explicit width:100%
   so their internal layout has defined space to grow into. */
[class*="elementor-widget-aew-"] { width: 100%; }

/* ── Stat Strip ─────────────────────────────────────────────────────────── */
.aew-stat-strip { display: grid; box-sizing: border-box; width: 100%; min-width: 0; }
.aew-stat-cols-2 { grid-template-columns: repeat(2, 1fr); }
.aew-stat-cols-3 { grid-template-columns: repeat(3, 1fr); }
.aew-stat-cols-4 { grid-template-columns: repeat(4, 1fr); }
.aew-stat-cols-5 { grid-template-columns: repeat(5, 1fr); }
.aew-stat-vertical { display: flex; flex-direction: column; }
.aew-stat-item { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; padding: 1rem; box-sizing: border-box; min-width: 0; }
.aew-stat-vertical .aew-stat-item { align-items: flex-start; text-align: left; }
.aew-stat-dividers .aew-stat-item:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 15%; bottom: 15%; width: 1px; background: currentColor; opacity: .2; }
.aew-stat-icon { display: block; font-size: 2rem; line-height: 1; margin-bottom: .4rem; }
.aew-stat-icon svg { display: block; }
.aew-stat-icon i { display: block; }
.aew-stat-value { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.aew-stat-label { font-size: .875rem; margin-top: .25rem; opacity: .75; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-stat-item a { text-decoration: none; color: inherit; }
/* Column counts now controlled by Elementor responsive controls (tablet_default / mobile_default).
   The .aew-stat-cols-* classes remain as fallback only. */

/* ── Comparison Bars ─────────────────────────────────────────────────────── */
.aew-bars-wrap { display: flex; flex-direction: column; gap: 12px; }
.aew-bar-row { display: flex; align-items: center; gap: 12px; }
.aew-bar-label { min-width: 160px; max-width: 160px; flex-shrink: 0; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aew-bar-track { flex: 1; height: 18px; border-radius: 4px; background: rgba(0,0,0,.1); overflow: hidden; position: relative; min-width: 0; }
.aew-bar-fill { display: block; border-radius: 4px; transition: width .8s cubic-bezier(.4,0,.2,1); }
.aew-bar-value { font-size: .85rem; white-space: nowrap; min-width: 60px; text-align: right; flex-shrink: 0; }
.aew-bar-target { position: absolute; top: 0; bottom: 0; width: 2px; border-left: 2px dashed; transform: translateX(-50%); }

/* ── Comparison bars — label position per breakpoint ─────────────────────── */
/* Desktop (all widths) */
.aew-label-top-desktop .aew-bar-row { flex-wrap: wrap; }
.aew-label-top-desktop .aew-bar-label { min-width: 0 !important; max-width: none !important; width: 100%; white-space: normal; overflow: visible; text-overflow: clip; }
/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .aew-label-top-tablet .aew-bar-row { flex-wrap: wrap; }
  .aew-label-top-tablet .aew-bar-label { min-width: 0 !important; max-width: none !important; width: 100%; white-space: normal; overflow: visible; text-overflow: clip; }
}
/* Mobile (≤767px) — also keeps legacy aew-bars-label-top class */
@media (max-width: 767px) {
  .aew-label-top-mobile .aew-bar-row,
  .aew-bars-label-top .aew-bar-row { flex-wrap: wrap; }
  .aew-label-top-mobile .aew-bar-label,
  .aew-bars-label-top .aew-bar-label { min-width: 0 !important; max-width: none !important; width: 100%; white-space: normal; overflow: visible; text-overflow: clip; }
}

/* ── Feature Comparison ──────────────────────────────────────────────────── */
.aew-fc-table { width: 100%; border-collapse: collapse; }
.aew-fc-row { display: grid; grid-template-columns: var(--aew-fc-cols, 1fr 1fr); }
.aew-fc-cell { padding: .75rem 1rem; border: 1px solid rgba(0,0,0,.1); box-sizing: border-box; display: flex; align-items: center; gap: .4rem; }
.aew-fc-header .aew-fc-cell { font-weight: 700; }
.aew-fc-icon-check { color: #10b981; font-weight: 700; flex-shrink: 0; }
.aew-fc-icon-cross { color: #ef4444; font-weight: 700; flex-shrink: 0; }
.aew-fc-icon-dash { opacity: .4; flex-shrink: 0; }
.aew-fc-highlight { position: relative; }
.aew-fc-highlight-glow { box-shadow: inset 0 0 0 1px currentColor, 0 0 12px rgba(0,0,0,.15); }
.aew-fc-row-heading { grid-column: 1 / -1; }
.aew-fc-heading-span { display: block; padding: .5rem 1rem; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .6; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
/* Mobile: hide row-first table, show column-first blocks instead */
.aew-fc-mobile { display: none; }
@media (max-width: 480px) {
  .aew-fc-table { display: none; }
  .aew-fc-mobile { display: block; }
  .aew-fc-mobile-col { margin-bottom: .75rem; }
  .aew-fc-mobile-heading { padding: .4rem 1rem; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .6; }
}

/* ── Data Table ───────────────────────────────────────────────────────────── */
.aew-dt-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.aew-dt { width: 100%; border-collapse: collapse; table-layout: fixed; }
.aew-dt th, .aew-dt td { padding: .6rem .9rem; border: 1px solid rgba(0,0,0,.12); text-align: left; overflow: hidden; text-overflow: ellipsis; }
.aew-dt thead th { font-weight: 700; }
.aew-dt tbody tr:nth-child(even) { background: rgba(0,0,0,.03); }
.aew-dt-rh { font-weight: 600; }
.aew-dt-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.aew-dt-sortable:hover { opacity: .8; }
.aew-dt-sort-icon::after { content: ' ↕'; opacity: .4; font-size: .75em; }
.aew-dt-sortable[aria-sort="ascending"] .aew-dt-sort-icon::after { content: ' ↑'; opacity: 1; }
.aew-dt-sortable[aria-sort="descending"] .aew-dt-sort-icon::after { content: ' ↓'; opacity: 1; }
.aew-dt-search-wrap { margin-bottom: .5rem; }
.aew-dt-search { width: 100%; padding: .4rem .75rem; border: 1px solid rgba(0,0,0,.2); border-radius: 4px; font: inherit; box-sizing: border-box; }
.aew-dt-hidden { display: none; }

/* Fix for phantom spacing below table when using pfc-table-no-footer class */
.pfc-table-no-footer { padding-bottom: 0 !important; }
.pfc-table-no-footer .aew-dt-wrap { margin-bottom: 0; }

/* ── Card Grid ────────────────────────────────────────────────────────────── */
.aew-card-grid { display: grid; gap: 16px; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; }
.aew-card-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.aew-card-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.aew-card-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.aew-equal-height .aew-card { height: 100%; }
.aew-card { border: 1px solid rgba(0,0,0,.1); border-radius: 8px; cursor: pointer; background: none; width: 100%; min-width: 0; text-align: left; font: inherit; color: inherit; transition: border-color .2s; box-sizing: border-box; display: flex; flex-direction: column; text-decoration: none; overflow: hidden; }
.aew-card:hover { border-color: rgba(0,0,0,.25); background-color: var(--aew-card-hover-bg, transparent); }
.aew-card.aew-active { border-color: currentColor; }
.aew-card-inner { padding: 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.aew-card-link { text-decoration: none; color: inherit; }
.aew-card-link:hover { text-decoration: none; }
.aew-card-icon-wrap { display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; padding: .4rem; margin-bottom: .25rem; }
.aew-card-icon { display: flex; align-items: center; justify-content: center; font-size: 2rem; line-height: 1; }
.aew-card-icon svg { display: block; }
.aew-card-icon i { display: block; }
.aew-card-title { font-weight: 700; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-card-subtitle { font-size: .85rem; opacity: .7; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-card-detail { border: 1px solid rgba(0,0,0,.1); border-radius: 8px; margin-top: 4px; grid-column: 1 / -1; min-width: 0; }
.aew-card-detail[hidden] { display: none; }
.aew-card-detail-inner { padding: 1rem; min-width: 0; }
.aew-card-detail-text { margin: 0 0 .5rem; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; min-width: 0; }
.aew-card-cta { display: inline-block; margin-top: 1rem; font-weight: 600; text-decoration: none; }
/* Card grid columns now controlled by Elementor responsive controls. .aew-card-cols-* are fallback only. */

/* ── Step Indicator ──────────────────────────────────────────────────────── */
.aew-steps { display: flex; gap: 24px; }
.aew-steps-horizontal { flex-direction: row; align-items: flex-start; }
.aew-steps-vertical { flex-direction: column; }
.aew-step { display: flex; gap: 12px; flex: 1; }
.aew-steps-vertical .aew-step { flex-direction: row; flex: none; }
.aew-step-node { display: flex; flex-direction: column; align-items: center; }
.aew-step-num { width: 40px; height: 40px; border-radius: 50%; background: #94a3b8; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; color: #fff; flex-shrink: 0; }
.aew-step-connector { flex: 1; min-height: 2px; min-width: 2px; background: #94a3b8; margin: 4px auto; }
.aew-steps-horizontal .aew-step-connector { display: none; }
.aew-steps-vertical .aew-step-connector { width: 2px; min-height: 24px; }
.aew-step-content { padding-top: 8px; }
.aew-steps-vertical .aew-step-content { padding-top: 0; padding-left: 4px; }
.aew-step-title { font-weight: 700; margin-bottom: .25rem; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-step-body { font-size: .875rem; opacity: .8; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-active .aew-step-num { background: #3b82f6; }
.aew-complete .aew-step-num { background: #10b981; }
.aew-steps[data-aew-interactive="1"] .aew-step { cursor: pointer; }
.aew-steps-conn-dashed .aew-step-connector { background: repeating-linear-gradient(to bottom, currentColor 0, currentColor 4px, transparent 4px, transparent 8px); }
.aew-steps-conn-dots .aew-step-connector { background: repeating-linear-gradient(to bottom, currentColor 0, currentColor 2px, transparent 2px, transparent 6px); }

/* ── Full-bleed background helper ────────────────────────────────────────── */
/* Extends widget_bg_color to 100vw without changing layout width.
   Parent sections must not have overflow:hidden for this to work. */
.aew-full-bleed { position: relative; overflow: visible; }
.aew-full-bleed::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 100vw;
  background: inherit;
  z-index: -1;
  pointer-events: none;
}

/* ── Flow Diagram ─────────────────────────────────────────────────────────── */
.aew-flow-diagram { position: relative; box-sizing: border-box; overflow-x: auto; }
.aew-fd-fallback { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.aew-fd-node-label { font-weight: 700; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-fd-node-sublabel { font-size: .8em; opacity: .75; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }

/* ── Flow Diagram hub animations ─────────────────────────────────────────── */
@keyframes aew-hub-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.045); opacity: 0.88; }
}
.aew-hub-pulse { animation: aew-hub-pulse 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes aew-hub-glow {
  0%, 100% { filter: drop-shadow(0 0 4px var(--hub-glow-color, #fff6)); }
  50%       { filter: drop-shadow(0 0 20px var(--hub-glow-color, #fff6)); }
}
.aew-hub-glow { animation: aew-hub-glow 2.2s ease-in-out infinite; }

@keyframes aew-hub-spin {
  to { transform: rotate(360deg); }
}
.aew-hub-spin { animation: aew-hub-spin 4s linear infinite; transform-box: fill-box; transform-origin: center; }

/* ── Onboarding Stepper ──────────────────────────────────────────────────── */
.aew-onboarding-stepper { width: 100%; box-sizing: border-box; }

/* Progress bar */
.aew-progress-bar { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 2rem; flex-wrap: wrap; }
.aew-progress-item { display: flex; align-items: center; gap: 8px; transition: opacity 0.3s; }
.aew-progress-dot { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; transition: background 0.3s; }
.aew-progress-active .aew-progress-dot { background: #3b82f6; }
.aew-progress-complete .aew-progress-dot { background: #10b981; }
.aew-progress-connector { width: 40px; height: 2px; background: #e2e8f0; transition: background 0.3s; }
.aew-progress-complete + .aew-progress-item .aew-progress-connector { background: #10b981; }

/* Progress numbered style */
.aew-progress-numbered .aew-progress-dot { display: none; }
.aew-progress-numbered .aew-progress-num { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #cbd5e1; color: #fff; font-weight: 700; font-size: 0.9rem; transition: background 0.3s; }
.aew-progress-numbered .aew-progress-active .aew-progress-num { background: #3b82f6; }
.aew-progress-numbered .aew-progress-complete .aew-progress-num { background: #10b981; }

/* Progress pills style */
.aew-progress-pills .aew-progress-dot { display: none; }
.aew-progress-pills .aew-progress-item { padding: 0.5rem 1rem; border-radius: 20px; background: #f1f5f9; transition: background 0.3s; }
.aew-progress-pills .aew-progress-num { font-weight: 700; margin-right: 0.5rem; }
.aew-progress-pills .aew-progress-label { font-size: 0.9rem; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-progress-pills .aew-progress-active { background: #dbeafe; }
.aew-progress-pills .aew-progress-complete { background: #d1fae5; }
.aew-progress-pills .aew-progress-connector { display: none; }
.aew-progress-pills .aew-progress-inactive { opacity: 0.5; }

/* Step cards */
.aew-steps-container { position: relative; min-height: 300px; }
.aew-step-card { opacity: 0; transform: translateX(20px); pointer-events: none; position: absolute; top: 0; left: 0; right: 0; }
.aew-step-card.aew-step-transition { transition: opacity 0.3s, transform 0.3s; }
.aew-step-visible { opacity: 1; transform: translateX(0); pointer-events: all; position: relative; }
.aew-step-hidden { display: none; }
.aew-step-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.aew-step-number { width: 48px; height: 48px; border-radius: 50%; background: #3b82f6; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.25rem; flex-shrink: 0; }
.aew-step-title { margin: 0; font-size: 1.5rem; font-weight: 700; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-step-intro { margin-bottom: 1.5rem; color: #64748b; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-step-content { margin-bottom: 1.5rem; line-height: 1.6; }

/* Selector grid */
.aew-selector-grid { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.aew-selector-cols-2 { grid-template-columns: repeat(2, 1fr); }
.aew-selector-cols-3 { grid-template-columns: repeat(3, 1fr); }
.aew-selector-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
  .aew-selector-cols-tablet-1 { grid-template-columns: 1fr; }
  .aew-selector-cols-tablet-2 { grid-template-columns: repeat(2, 1fr); }
  .aew-selector-cols-tablet-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .aew-selector-cols-mobile-1 { grid-template-columns: 1fr; }
  .aew-selector-cols-mobile-2 { grid-template-columns: repeat(2, 1fr); }
}

.aew-selector-card { padding: 1.5rem; border: 2px solid #e2e8f0; border-radius: 8px; cursor: pointer; transition: all 0.2s; background: #fff; text-align: center; }
.aew-selector-card:hover { border-color: #cbd5e1; background: #f8fafc; }
.aew-selector-card[aria-pressed="true"] { border-color: #3b82f6; background: #eff6ff; }
.aew-selector-card .aew-card-icon-wrap { display: flex; justify-content: center; margin-bottom: 1rem; }
.aew-selector-card .aew-card-icon { font-size: 2.5rem; display: flex; align-items: center; justify-content: center; }
.aew-selector-card .aew-card-icon svg { width: 2.5rem; height: 2.5rem; }
.aew-selector-card .aew-card-title { font-weight: 700; font-size: 1.125rem; margin-bottom: 0.5rem; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-selector-card .aew-card-subtitle { font-size: 0.875rem; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-selector-card .aew-card-badge { display: inline-block; margin-top: 0.5rem; padding: 0.25rem 0.75rem; border-radius: 12px; background: #fef3c7; color: #92400e; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* Checklist */
.aew-checklist-wrap { margin-bottom: 1.5rem; }
.aew-checklist-item { margin-bottom: 1rem; }
.aew-checklist-label { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-checklist-checkbox { width: 20px; height: 20px; border: 2px solid #cbd5e1; border-radius: 4px; cursor: pointer; flex-shrink: 0; margin-top: 2px; accent-color: #10b981; }
.aew-checklist-text { font-size: 1rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-callout { margin-top: 0.5rem; margin-left: 2rem; padding: 0.75rem 1rem; border-radius: 6px; font-size: 0.875rem; line-height: 1.5; }
.aew-callout-info { background: #dbeafe; color: #1e3a8a; border-left: 3px solid #3b82f6; }
.aew-callout-warning { background: #fef3c7; color: #92400e; border-left: 3px solid #f59e0b; }
.aew-callout-success { background: #d1fae5; color: #065f46; border-left: 3px solid #10b981; }

/* Navigation buttons */
.aew-nav-buttons { display: flex; gap: 1rem; justify-content: flex-end; margin-top: 2rem; flex-wrap: wrap; }
.aew-btn-advance, .aew-btn-back, .aew-btn-reset { padding: 0.75rem 1.5rem; border: none; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.aew-btn-advance { background: #3b82f6; color: #fff; }
.aew-btn-advance:hover:not(:disabled) { background: #2563eb; }
.aew-btn-back { background: #f1f5f9; color: #475569; }
.aew-btn-back:hover:not(:disabled) { background: #e2e8f0; }
.aew-btn-reset { background: #ef4444; color: #fff; }
.aew-btn-reset:hover { background: #dc2626; }
.aew-btn-advance:disabled, .aew-btn-back:disabled { opacity: 0.5; cursor: not-allowed; }

/* Completion message */
.aew-completion-message { text-align: center; padding: 3rem 1rem; }
.aew-completion-message p { font-size: 1.5rem; font-weight: 700; color: #10b981; margin: 0; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }

/* Example prompts */
.aew-prompts-section { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid #e2e8f0; }
.aew-prompts-heading { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: #475569; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-prompt-card { position: relative; padding: 1rem 1.25rem; border-radius: 8px; margin-bottom: 0.75rem; transition: box-shadow 0.2s; }
.aew-prompt-green { background: #d1fae5; border-left: 3px solid #10b981; }
.aew-prompt-blue { background: #dbeafe; border-left: 3px solid #3b82f6; }
.aew-prompt-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.aew-tool-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.aew-tool-pill { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 12px; background: rgba(255,255,255,0.7); font-size: 0.75rem; font-weight: 600; border: 1px solid rgba(0,0,0,0.1); }
.aew-prompt-text { font-size: 0.95rem; line-height: 1.5; color: #1e293b; padding-right: 3rem; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word; }
.aew-btn-copy { position: absolute; top: 1rem; right: 1rem; padding: 0.5rem; border: none; background: rgba(255,255,255,0.9); border-radius: 6px; cursor: pointer; transition: all 0.2s; font-size: 1.25rem; line-height: 1; }
.aew-btn-copy:hover { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.aew-btn-copy:active { transform: scale(0.95); }
.aew-copy-icon { display: block; }

/* Mobile responsiveness */
@media (max-width: 767px) {
  .aew-step-header { flex-direction: column; align-items: flex-start; }
  .aew-step-number { width: 40px; height: 40px; font-size: 1rem; }
  .aew-step-title { font-size: 1.25rem; }
  .aew-nav-buttons { justify-content: center; }
  .aew-progress-bar { gap: 4px; }
  .aew-progress-connector { width: 20px; }
}

/* Animations */
@keyframes aew-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
/* Animation removed - causes unwanted fade-in on page load. Transition via .aew-step-transition handles step navigation. */
