import { css } from 'lit'

export default css`
  :host {
    display: inline-flex;
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    justify-content: center;
    height: 40px;
    width: 40px;

    --_focus-icon-color: var(--md-icon-button-focus-icon-color, var(--md-sys-color-on-surface-variant, #49454f));
    --_hover-icon-color: var(--md-icon-button-hover-icon-color, var(--md-sys-color-on-surface-variant, #49454f));
    --_hover-state-layer-color: var(
      --md-icon-button-hover-state-layer-color,
      var(--md-sys-color-on-surface-variant, #49454f)
    );
    --_hover-state-layer-opacity: var(--md-icon-button-hover-state-layer-opacity, 0.08);
    --_icon-color: var(--md-icon-button-icon-color, var(--md-sys-color-on-surface-variant, #49454f));
    --_pressed-icon-color: var(--md-icon-button-pressed-icon-color, var(--md-sys-color-on-surface-variant, #49454f));
    --_pressed-state-layer-color: var(
      --md-icon-button-pressed-state-layer-color,
      var(--md-sys-color-on-surface-variant, #49454f)
    );
    --_pressed-state-layer-opacity: var(--md-icon-button-pressed-state-layer-opacity, 0.12);
    --_state-layer-shape: var(--md-icon-button-state-layer-shape, var(--md-sys-shape-corner-full, 9999px));
  }

  .icon-button {
    background-color: rgba(0, 0, 0, 0);
    color: var(--_icon-color);
    place-items: center;
    background: none;
    border: none;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    place-content: center;
    outline: none;
    padding: 0;
    position: relative;
    text-decoration: none;
    user-select: none;
    z-index: 0;
    flex: 1;
    border-radius: var(--_state-layer-shape);

    --md-ripple-hover-state-layer-color: var(--md-sys-color-primary);
    --md-ripple-focus-state-layer-color: var(--md-sys-color-primary);
    --md-ripple-pressed-state-layer-color: var(--md-sys-color-on-surface);
  }

  .icon-button:hover {
    color: var(--_hover-icon-color);
  }

  .icon-button:focus {
    color: var(--_focus-icon-color);
  }

  .icon-button:active {
    color: var(--_pressed-icon-color);
  }

  md-focus-ring {
    --md-focus-ring-shape-start-start: var(--_state-layer-shape);
    --md-focus-ring-shape-start-end: var(--_state-layer-shape);
    --md-focus-ring-shape-end-end: var(--_state-layer-shape);
    --md-focus-ring-shape-end-start: var(--_state-layer-shape);
  }

  .ripple {
    border-radius: var(--_state-layer-shape);
    z-index: 1;
  }

  .icon {
    display: inline-flex;
    border-radius: var(--_state-layer-shape);
    overflow: hidden;
  }

  .user-icon,
  .avatar-initials {
    background-color: var(--md-sys-color-primary-container, #9eeffe);
    color: var(--md-sys-color-on-primary-container, #001f24);
  }

  .avatar-initials {
    text-transform: uppercase;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .user-icon,
  .icon-button,
  .icon {
    height: inherit;
    width: inherit;
  }

  .avatar-background {
    fill: var(--md-sys-color-primary-container, #9eeffe);
  }

  .avatar-lines {
    fill: var(--md-sys-color-on-primary-container, #001f24);
  }
`
