@use '../../../css/_config/_mixins';
@use '../../../css/_config/_vars';

.wrap {
}

// BUTTON

.btn {
  display: block;
  appearance: none;
  width: 100%;
  max-width: 230px;
  padding: 17px 16px;
  margin: 0;
  background: vars.$color-core;
  border: 1px solid vars.$color-opacity-02;
  border-radius: 10px;

  font-size: 18px;
  line-height: 22px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  color: vars.$color-primary-background;

  @include mixins.focus-self-outline;

  @media (min-width: 1024px) {
    max-width: 240px;
  }

  &:disabled {
    background: var(--color-opacity-005) !important;
    border: 1px solid var(--color-opacity-01) !important;
    color: var(--color-opacity-03) !important;
    cursor: default;
    cursor: not-allowed;
  }

  :global(.text-center) & {
    margin: 0 auto;
  }

  :global(html.logged-in) & {
    background: var(--color-core);
    border: 1px solid var(--color-opacity-02);
    color: var(--color-primary-background);
  }

  // inline

  &.inline {
    display: inline-block;
    width: auto;
    margin: 0;
  }

  // loading / submitting

  &.loading {
    background-image: url(../../../images/loading-white.gif);
    background-image: url(../../../images/loading-white.png);
    background-size: 32px 32px;
    background-position: 50% 50%;
    background-repeat: no-repeat;

    color: rgba(0, 0, 0, 0) !important;
  }

  // centering

  :global(.u-center-all) & {
    margin-inline: auto;
  }
  :global(.u-center-mobile) & {
    @media (max-width: 1023px) {
      margin-inline: auto;
    }
  }
  :global(.u-center-tablet-desktop) & {
    @media (min-width: 768px) {
      margin-inline: auto;
    }
  }
  :global(.u-center-desktop) & {
    @media (min-width: 1024px) {
      margin-inline: auto;
    }
  }

  // icon
  .icon {
    display: inline-block;
    position: relative;
    top: 2px;
    width: 18px;
    height: 18px;
    margin: -2px 10px -2px 0;
  }
}

//
// VARIANTS
//

.colorSecondary {
  // background: vars.$color-text;
  // border: 1px solid vars.$color-opacity-01;
  // color: vars.$color-primary-background;

  :global(html.logged-in) & {
    background: var(--color-button-secondary);
    border: 1px solid var(--color-text);
    color: var(--color-primary-background);
  }
}

.colorTertiary {
  background: vars.$color-secondary-border;
  border: 1px solid vars.$color-opacity-01;
  color: vars.$color-text;

  :global(html.logged-in) & {
    background: var(--color-tertiary-background);
    border: 1px solid var(--color-tertiary-border);
    color: var(--color-text);
  }
}

.sizeMedium {
  max-width: 210px;
  padding: 15px 10px;
  font-size: 16px;
  line-height: 20px;

  // max-width: 180px;
  // padding: 16px 10px;
  // font-size: 14px;
  // line-height: 16px;

  .icon {
    width: 16px;
    height: 16px;
  }
}

.sizeModal {
  min-width: 120px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 16px;

  .icon {
    width: 14px;
    height: 14px;
  }
}

.sizeSmall {
  min-width: 90px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 16px;

  .icon {
    width: 14px;
    height: 14px;
  }
}
