/* ==========================================================================
   Welcome / Onboarding Screen Styles
   Scoped with @scope (.welcome-screen) and @scope (.account-card)
   ========================================================================== */

@scope (.welcome-screen) {
  :scope {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80dvh;
    padding: var(--space-2xl) var(--space-lg);
    font-family: var(--font-sans);
  }

  .welcome-screen__container {
    width: 100%;
    max-width: var(--spacing-96); /* ~640px */
    display: flex;
    flex-direction: column;
    gap: var(--space-2xl);
    text-align: center;
  }

  .welcome-screen__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }

  .welcome-screen__logo {
    width: var(--spacing-16);
    height: var(--spacing-16);
    margin-bottom: var(--space-md);
    
    svg {
      width: 100%;
      height: 100%;
    }
  }

  .welcome-screen__title {
    font-size: var(--text-heading-1);
    font-weight: var(--font-bold);
    color: var(--color-text-heading);
    letter-spacing: var(--tracking-tight);
    margin: 0;
  }

  .welcome-screen__subtitle {
    font-size: var(--text-heading-4);
    font-weight: var(--font-semibold);
    color: var(--color-primary);
    margin: 0;
  }

  .welcome-screen__hint {
    font-size: var(--text-body);
    color: var(--color-text-secondary);
    max-width: var(--spacing-80);
    margin-inline: auto;
    margin-block-start: var(--space-xs);
  }

  .welcome-screen__grid {
    display: grid;
    gap: var(--space-md);
    width: 100%;
    text-align: start;

    &.welcome-screen__grid--multi {
      grid-template-columns: repeat(auto-fit, minmax(var(--spacing-72), 1fr));
    }

    &.welcome-screen__grid--few {
      grid-template-columns: 1fr;
      max-width: var(--spacing-80);
      margin-inline: auto;
    }
  }

  .welcome-screen__empty {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl) var(--space-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    box-shadow: var(--shadow-sm);
  }

  .welcome-screen__empty-icon-wrapper {
    width: var(--spacing-12);
    height: var(--spacing-12);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-muted);
    border-radius: var(--radius-full);
    color: var(--color-text-muted);
  }

  .welcome-screen__empty-icon {
    font-size: var(--text-heading-3);
  }

  .welcome-screen__empty-message {
    color: var(--color-text-secondary);
    font-size: var(--text-body-sm);
    line-height: var(--leading-relaxed);
    max-width: var(--spacing-72);
    margin: 0;
  }

  .welcome-screen__action-btn {
    min-width: var(--spacing-48);
  }
}

@scope (.account-card) {
  :scope {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: var(--shadow-sm);

    &:hover {
      outline: var(--focus-ring);
      outline-offset: -2px;
      box-shadow: var(--shadow-sm);
      text-decoration: none;

      .account-card__arrow {
        color: var(--color-primary);
      }

      .account-card__icon-wrapper {
        background: var(--color-primary-muted);
        color: var(--color-primary);
      }
    }

    &:focus-visible {
      outline: var(--focus-ring);
      outline-offset: var(--focus-ring-offset);
    }
  }

  .account-card__icon-wrapper {
    width: var(--spacing-12);
    height: var(--spacing-12);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-muted);
    border-radius: var(--radius-lg);
    color: var(--color-text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .account-card__icon {
    font-size: var(--text-heading-4);
  }

  .account-card__details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
  }

  .account-card__name {
    font-size: var(--text-heading-5);
    font-weight: var(--font-semibold);
    color: var(--color-text-heading);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .account-card__role {
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    color: var(--color-text-muted);
    background: var(--color-surface-muted);
    padding: var(--space-2xs) var(--space-xs);
    border-radius: var(--radius-sm);
    align-self: flex-start;

    &.account-card__role--superadmin {
      color: var(--color-warning-text);
      background: var(--color-warning-muted);
    }
  }

  .account-card__arrow {
    color: var(--color-text-muted);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .account-card__arrow-icon {
    font-size: var(--text-heading-5);
  }
}
