/**
 * LWF State widgets — scoped under .lwf-state-widgets
 * Tokens: spacing, typography, card, grid breakpoint
 */

/* -----------------------------------------------------------------------------
   Tokens
   ----------------------------------------------------------------------------- */
.lwf-state-widgets {
  --lwf-space-xs: 0.25rem;
  --lwf-space-sm: 0.5rem;
  --lwf-space-md: 1rem;
  --lwf-space-lg: 1.5rem;
  --lwf-space-xl: 2rem;
  --lwf-space-2xl: 2.5rem;
  --lwf-space-3xl: 3rem;

  --lwf-font-h2: 1.5rem;
  --lwf-font-h3: 1.125rem;
  --lwf-font-lead: 1rem;
  --lwf-font-muted: 0.875rem;
  --lwf-font-body: 0.9375rem;
  --lwf-line-tight: 1.3;
  --lwf-line-normal: 1.5;

  --lwf-card-radius: 16px;
  --lwf-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --lwf-card-bg: #fff;
  --lwf-card-padding: 20px;

  --lwf-break-stack: 900px;
  --lwf-avatar-size: 64px;
  --lwf-icon-size: 28px;
  --lwf-stat-icon-size: 40px;
  --lwf-chevron-size: 6px;
  --lwf-licensed-color: #00a5a5;
  --lwf-stat-green: #0d8050;
  --lwf-stat-green-bg: #e6f4ea;
  --lwf-stat-blue: #1a73e8;
  --lwf-stat-blue-bg: #e8f0fe;
  --lwf-stat-purple: #5e35b1;
  --lwf-stat-purple-bg: #f3e8fd;
  --lwf-check-green: #1e8e3e;
  --lwf-check-green-bg: #e6f4ea;
  --lwf-info-blue: #1a73e8;
  --lwf-info-blue-bg: #e8f0fe;
}

/* -----------------------------------------------------------------------------
   Shared section + typography
   ----------------------------------------------------------------------------- */
.lwf-state-widgets.lwf-section {
  max-width: 100%;
  box-sizing: border-box;
}

/* Section header: title + description wrapper */
.lwf-state-widgets .lwf-section-header {
  text-align: center;
}

/* Section title: h2 #051049, optional strong span #2EB99B */
.lwf-state-widgets .lwf-section-header .lwf-section-title-h2 {
  color: #051049;
}

.lwf-state-widgets .lwf-section-header .lwf-section-title-h2 .lwf-section-title-strong {
  color: #2EB99B;
}

.lwf-state-widgets .lwf-h3 {
  font-size: var(--lwf-font-h3);
  line-height: var(--lwf-line-tight);
  margin: 0 0 var(--lwf-space-sm);
  font-weight: 600;
}

.lwf-state-widgets .lwf-section-header p {
  font-size: 16px;
  line-height: var(--lwf-line-normal);
  margin: 0 0 var(--lwf-space-xl);
  color: #444;
}

.lwf-state-widgets .lwf-muted {
  font-size: var(--lwf-font-muted);
  line-height: var(--lwf-line-normal);
  margin: 0;
  color: #666;
}

.lwf-state-widgets .lwf-card {
  background: var(--lwf-card-bg);
  border-radius: var(--lwf-card-radius);
  box-shadow: var(--lwf-card-shadow);
  padding: 30px;
  max-width: 100%;
}

/* -----------------------------------------------------------------------------
   Grid (2-col desktop, stack under breakpoint)
   ----------------------------------------------------------------------------- */
.lwf-state-widgets .lwf-grid {
  display: grid;
  gap: var(--lwf-space-xl);
  max-width: 100%;
}

.lwf-state-widgets .lwf-grid--2 {
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .lwf-state-widgets .lwf-grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}

.lwf-state-widgets .lwf-grid--gap-lg {
  gap: var(--lwf-space-2xl);
}

.lwf-intro-text {
  
}

/* -----------------------------------------------------------------------------
   Broker Bio — .lwf-section--broker (50/50 split; image right; stack on mobile)
   ----------------------------------------------------------------------------- */
.lwf-state-widgets.lwf-section--broker .lwf-broker-left {
  min-width: 0;
}

.lwf-state-widgets.lwf-section--broker .lwf-broker-right {
  display: flex;
  align-items: flex-start;
  margin-top: var(--lwf-space-lg);
}

.lwf-state-widgets.lwf-section--broker .lwf-broker-right .lwf-image-card {
  width: 100%;
  padding: 30px;
  padding-top: 0;
  box-shadow: none;
  border: none;
}

.lwf-state-widgets.lwf-section--broker .lwf-broker-right .lwf-image-card img {
  width: 100%;
  height: auto;
  display: block;
}

.lwf-state-widgets.lwf-section--broker .lwf-broker-card {
  display: block;
  margin-top: var(--lwf-space-lg);
}

.lwf-state-widgets .lwf-broker-top {
  display: flex;
  align-items: center;
  gap: var(--lwf-space-lg);
  margin-bottom: var(--lwf-space-lg);
}

.lwf-state-widgets .lwf-broker-avatar {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  background: #eaeaea;
}

.lwf-state-widgets .lwf-broker-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lwf-state-widgets .lwf-broker-meta {
  flex: 1;
  min-width: 0;
}

.lwf-state-widgets .lwf-broker-card .lwf-h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 var(--lwf-space-xs);
}

.lwf-state-widgets .lwf-broker-licensed {
  font-size: var(--lwf-font-muted);
  line-height: var(--lwf-line-normal);
  margin: var(--lwf-space-sm) 0 0;
  color: var(--lwf-licensed-color);
}

.lwf-state-widgets .lwf-broker-licensed-label {
  font-weight: 500;
}

.lwf-state-widgets .lwf-broker-licensed-states {
  font-weight: 700;
  color: #051049;
}

.lwf-state-widgets .lwf-broker-bio {
  padding-top: var(--lwf-space-md);
  border-top: 1px solid #eee;
  font-size: 16px;
  line-height: var(--lwf-line-normal);
  color: #444;
}

.lwf-state-widgets .lwf-broker-bio p:first-child {
  margin-top: 0;
}

.lwf-state-widgets .lwf-broker-bio p:last-child {
  margin-bottom: 0;
}

.lwf-state-widgets .lwf-details {
  border: none;
  margin: 0;
  padding: 0;
}

.lwf-state-widgets .lwf-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--lwf-space-sm) 0;
  cursor: pointer;
  list-style: none;
  font-size: var(--lwf-font-body);
  font-weight: 500;
  color: #1a73e8;
  user-select: none;
}

.lwf-state-widgets .lwf-summary::-webkit-details-marker {
  display: none;
}

.lwf-state-widgets .lwf-chevron {
  display: inline-block;
  width: var(--lwf-chevron-size);
  height: var(--lwf-chevron-size);
  margin-left: var(--lwf-space-sm);
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  vertical-align: middle;
}

.lwf-state-widgets .lwf-details[open] .lwf-chevron {
  transform: rotate(-135deg);
}

.lwf-state-widgets .lwf-details-body {
  padding-top: var(--lwf-space-sm);
  padding-bottom: var(--lwf-space-md);
  font-size: var(--lwf-font-body);
  line-height: var(--lwf-line-normal);
}

.lwf-state-widgets .lwf-details-body p:first-child {
  margin-top: 0;
}

.lwf-state-widgets .lwf-details-body p:last-child {
  margin-bottom: 0;
}

/* -----------------------------------------------------------------------------
   Market at a Glance — .lwf-section--market
   ----------------------------------------------------------------------------- */
.lwf-state-widgets.lwf-section--market .lwf-market-stats {
  display: flex;
  flex-direction: column;
  gap: var(--lwf-space-lg);
  justify-content: space-around;
  height: 100%;
}

.lwf-state-widgets .lwf-stat {
  display: flex;
  align-items: flex-start;
  gap: var(--lwf-space-md);
  max-width: 100%;
}

.lwf-state-widgets .lwf-stat-icon {
  flex-shrink: 0;
  width: var(--lwf-stat-icon-size);
  height: var(--lwf-stat-icon-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lwf-stat-green-bg);
  color: var(--lwf-stat-green);
}

.lwf-state-widgets .lwf-stat-icon .lwf-stat-icon-svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.lwf-state-widgets .lwf-market-stats .lwf-stat:nth-child(1) .lwf-stat-icon {
  background: var(--lwf-stat-green-bg);
  color: var(--lwf-stat-green);
}

.lwf-state-widgets .lwf-market-stats .lwf-stat:nth-child(2) .lwf-stat-icon {
  background: var(--lwf-stat-blue-bg);
  color: var(--lwf-stat-blue);
}

.lwf-state-widgets .lwf-market-stats .lwf-stat:nth-child(3) .lwf-stat-icon {
  background: var(--lwf-stat-purple-bg);
  color: var(--lwf-stat-purple);
}

.lwf-state-widgets .lwf-stat-body {
  flex: 1;
  min-width: 0;
}

.lwf-state-widgets .lwf-stat-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--lwf-space-sm);
  margin-bottom: var(--lwf-space-xs);
  color: var(--e-global-color-7f7051b);
}

.lwf-state-widgets .lwf-stat-label {
  font-size: var(--lwf-font-h3);
  font-weight: 600;
}

.lwf-state-widgets .lwf-stat-value {
  font-size: var(--lwf-font-h3);
  font-weight: 600;
}

.lwf-state-widgets .lwf-stat-desc {
  font-size: var(--lwf-font-body);
  line-height: var(--lwf-line-normal);
  color: #444;
  margin: 0;
}

.lwf-state-widgets .lwf-image-card {
  overflow: hidden;
  padding: 0;
}

.lwf-state-widgets .lwf-image-card img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

.lwf-state-widgets.lwf-section--market .lwf-market-right {
  display: flex;
  align-items: flex-start;
}

.lwf-state-widgets.lwf-section--market-no-image .lwf-grid--2 {
  grid-template-columns: 1fr;
}

@media (max-width: 899px) {
  .lwf-state-widgets.lwf-section--market .lwf-market-left {
    order: 1;
  }
  .lwf-state-widgets.lwf-section--market .lwf-market-right {
    order: 0;
  }
}

/* -----------------------------------------------------------------------------
   Disclosure — .lwf-section--disclosure
   ----------------------------------------------------------------------------- */
.lwf-disclosure-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.lwf-state-widgets .lwf-checklist-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 var(--lwf-space-lg);
  color: #051049;
}

.lwf-state-widgets .lwf-checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lwf-state-widgets .lwf-check {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
}

.lwf-state-widgets .lwf-check-icon {
  flex-shrink: 0;
  width: var(--lwf-icon-size);
  height: var(--lwf-icon-size);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2eb99b;
}

.lwf-state-widgets .lwf-check-icon .lwf-check-icon-svg {
  width: 24px;
  height: 24px;
}

.lwf-state-widgets .lwf-check-body {
  flex: 1;
  min-width: 0;
}

.lwf-state-widgets .lwf-check-title {
  font-size: var(--lwf-font-body);
  font-weight: 700;
  color: #051049;
}

.lwf-state-widgets .lwf-check-text {
  font-size: 16px;
  line-height: var(--lwf-line-normal);
  color: #444;
  font-weight: 400;
}

.lwf-state-widgets.lwf-section--disclosure-no-image .lwf-grid--2 {
  grid-template-columns: 1fr;
}

/* -----------------------------------------------------------------------------
   FAQ Accordion — .lwf-section--faq (own structure, scoped)
   ----------------------------------------------------------------------------- */
.lwf-state-widgets.lwf-section--faq .lwf-faq {
  background: transparent;
  width: 100%;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__item {
  box-shadow: none;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 20px;
  cursor: pointer;
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  gap: 5px;
}

.lwf-state-intro {
  text-align: center;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__title {
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  color: #111827;
  flex: 1;
  min-width: 0;
  white-space: break-spaces;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 29px;
  line-height: 0.5;
  font-weight: 700;
  flex-shrink: 0;
  color: #8e33ce;
  transition: color 0.25s ease, transform 0.25s ease;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__item--open .lwf-faq__icon {
  color: #10B981;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__item--open .lwf-faq__title {
  color: #29a58a;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__panel {
  overflow: hidden;
  height: 0;
  transition: height 400ms ease-in-out;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__item--open .lwf-faq__panel {
  height: auto;
  overflow: visible;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__panel-inner {
  padding: 16px 20px;
  font-size: 18px;
  line-height: 1.6;
  color: #4B5563;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__panel-inner p:first-child {
  margin-top: 0;
}

.lwf-state-widgets.lwf-section--faq .lwf-faq__panel-inner p:last-child {
  margin-bottom: 0;
}
