import { css } from 'lit'

export default css`
  :host {
    display: block;
    max-width: 600px;
  }

  .currency-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  md-outlined-select {
    flex: 1;
    min-width: 200px;
  }

  .flag {
    font-size: 20px;
    width: 24px;
    text-align: center;
  }

  .currency-symbol {
    color: var(--md-sys-color-primary);
    font-size: 1rem;
  }

  /* Error states using ElementInternals */
  .error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 4px;
    border-radius: 4px;
    font-size: 0.875rem;
    line-height: 1.25rem;
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
    border: 1px solid var(--md-sys-color-error);
  }

  .error-message {
    font-weight: 500;
  }

  /* Host error state using ElementInternals validity */
  :host([data-error]) {
    --md-outlined-select-outline-color: var(--md-sys-color-error);
  }

  :host([data-error]) md-outlined-select {
    --md-outlined-select-focus-outline-color: var(--md-sys-color-error);
  }
`
