/*
 * https://github.com/morethanwords/tweb
 * Copyright (C) 2019-2021 Eduard Kuzmenko
 * https://github.com/morethanwords/tweb/blob/master/LICENSE
 */

.popup {
  :global(.popup-container) {
    width: 21rem;
    border-radius: 14px;
    padding: 0;
  }

  :global(.popup-header) {
    margin-bottom: 0;
  }

  :global(.popup-buttons) {
    padding: 0 0.25rem;
    margin: 0.5rem;
  }

  :global(.popup-body) {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  :global(.input-field) {
    margin: 0;
  }
}

.header {
  padding: 1rem;
  padding-top: 0;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
}

.body {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.checklist {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 1rem;
}

.appendList {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1rem;
  padding-top: 0;
}

.groupTitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--secondary-text-color);
  margin-bottom: 0.5rem;
}

.item {
  position: relative;
  width: 100%;

  .itemRemoveButton {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
  }

  :global(.input-field-border), :global(.input-field-input) {
    border-radius: 0;
  }

  :global(.input-field-input) {
    border-bottom: 1px solid transparent;
    padding-right: 3rem;

    &:hover {
      border-bottom-color: var(--input-search-border-color);
    }

    &:global(.error) {
      border-bottom-color: var(--danger-color);
    }
  }

  &.itemFirst {
    :global(.input-field-border), :global(.input-field-input) {
      border-top-left-radius: 10px;
      border-top-right-radius: 10px;
    }
  }

  &.itemLast {
    :global(.input-field-border), :global(.input-field-input) {
      border-bottom-left-radius: 10px;
      border-bottom-right-radius: 10px;
    }

    :global(.input-field-input) {
      border-bottom: 1px solid var(--input-search-border-color);

      &:global(.error) {
        border-bottom-color: var(--danger-color);
      }
    }
  }
}

.addTaskButton {
  width: 100%;
  margin-top: 0.5rem;
  border-radius: 10px;
}

.options {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}