@use '_theme.scss';

.preflight-warning-tooltip {
  position: absolute;
  bottom: 66px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: fit-content;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));

  .preflight-warning-content {
    position: relative;
    box-sizing: border-box;
    background: #FFFFFF;
    border: 1px solid #D6D6D6;
    border-radius: 5px;
    width: 320px;
    font-size: var(--text-size-regular);
    color: var(--text-color-ultra-dark);
  }

  .preflight-warning-message {
    padding: 20px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: break-word;

    a {
      text-decoration: none;
    }
  }

  .preflight-warning-buttons {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: flex-end;
    padding: 20px;
    gap: 15px;
    border-top: 1px solid rgba(214, 214, 214, 1);
  }

  .preflight-warning-cancel {
    padding: 6px 16px;
    font-size: 14px;
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-highlight);
  }

  .preflight-warning-next {
    padding: 6px 28px;
    font-size: 14px;
    border-radius: 20px;
    border: 1px solid var(--color-highlight);
    background: #FFFFFF;
    color: var(--color-highlight);
    cursor: pointer;
    outline: none;
    width:100%;
  }

  .preflight-warning-arrow {
    display: block;
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 22px;
    height: 22px;
    background: #FFFFFF;
    border-bottom: 1px solid #D6D6D6;
    border-right: 1px solid #D6D6D6;
    z-index: 1;
  }

  &.sticky-mode {
    position: absolute;
    bottom: 100%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    margin-bottom: 4px;
    z-index: 1;
  }

  &.sticky-desktop {
    .preflight-warning-content {
      width: 260px;
    }
  }
}
