@import "components/modal";
@import "components/dialog";
@import "components/notice";
@import "components/loading";

.vns-form-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr;
  grid-column-gap: 1rem;
  max-width: 100%;

  &.is-3-columns {
    grid-template-columns: repeat(3, 1fr);
  }
}

.vns-form-control {
  max-width: 100%;
  position: relative;
  box-sizing: border-box;
  margin-bottom: 1rem;

  label {
    color: #666;
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 13px;
  }

  input:not([type="radio"]):not([type="checkbox"]),
  textarea {
    width: 100%;
    display: block;
  }
}

.vns-grid-row {
  width: 100%;
  display: flex;

  margin-left: -0.5rem;
  margin-right: -0.5rem;

  .vns-grid-column {
    flex: 0 0 50%;
    max-width: 50%;
    position: relative;

    padding-left: .5rem;
    padding-right: .5rem;
  }
}

.vns-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;

  &.is-center {
    justify-content: center;
  }

  .is-destroy {
    color: #b32d2e;
  }
}

.vns-couriers {
  box-sizing: border-box;
  list-style: none;
  display: flex;
  justify-content: center;
  align-content: center;
  flex-direction: row;
  flex-wrap: wrap;
  margin: 0 auto;
  padding: 0;

  li {
    box-sizing: border-box;
    cursor: pointer;

    margin: 0 0.5rem 0.5rem;
    width: 180px;
    max-width: 180px;
    position: relative;
    z-index: 10;
  }

  input {
    position: absolute;
    z-index: 11;
    top: 0.7rem;
    left: 0.5rem;
  }

  label {
    display: flex;
    align-items: center;
    flex-direction: column;
    padding: 1rem;

    border: solid 3px #eee;
    border-radius: 4px;

    &:hover,
    &:active {
      border-color: #ddd;
    }
  }

  input:checked ~ label {
    border-color: #607d8b;
  }

  img {
    width: auto;
    max-width: 100%;
    height: 42px;
    object-fit: contain;
  }

  strong {
    display: block;
    margin-top: 0.5rem;
  }
}

.vns-create-form {
  width: 1020px;
  max-width: 1020px;
  display: flex;

  section h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: solid 2px #eee;
  }

  &__main {
    flex: 0 0 60%;
    max-width: 60%;
  }

  &__side {
    flex: 0 0 40%;
    max-width: 40%;
    padding-left: 1rem;
  }

  &__submit {
    border: 2px solid #b8b9b9;
    border-radius: 6px;
    padding: 1rem;
    box-sizing: border-box;

    button[type=submit] {
      width: 100%;
      display: block;
    }
  }
}

.vns-service-list {
  box-sizing: border-box;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-direction: column;

  li {
    width: 100%;
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  input[type="radio"] {
    margin-top: 3px;
    margin-right: 1rem;
  }

  p {
    margin-top: 0;
    margin-bottom: 5px;
  }
}

.vns-tracking-info {
  padding-top: 1rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
  text-align: center;

  p {
    margin: 0;
    margin-bottom: 5px;
  }

  img {
    max-height: 32px;
    max-width: 100%;
    height: auto;
  }

  &__code {
    display: inline-block;
    padding: 5px 20px;
    font-weight: 700;
    font-size: 1.4rem;
    border: dashed 2px #737373;
    box-sizing: border-box;
  }

  &__logo {
    top: 2px;
    left: 5px;
    position: absolute;
    width: 5rem;
    z-index: 2;
  }
}
