#addresses {
  turbo-frame[aria-busy=true]::before {
    display: none;
  }

  .group {
    margin-bottom: 1.5rem;
    position: relative;
    text-align: left;

    label {
      display: block;
      width: max-content;
    }
    label::after {
      content: "*";
      display: inline;
      margin: 0 0.25rem;
      color: red;
    }

    input:not([type=checkbox],[type=radio]),
    select,
    textarea {
      margin-bottom: 0;
      &::placeholder {
        font-size: 0.875rem;
      }
    }

    input[aria-invalid=true] + small,
    select[aria-invalid=true] + small,
    textarea[aria-invalid=true] + small {
      visibility: visible;
      transform: translateY(0);
      transition: transform 100ms linear;
    }

    small {
      margin-top: 0;
      position: absolute;
      visibility: hidden;
      transform: translateY(-25%);
    }

    ul {
      position: absolute;
      width: 100%;
      max-height: 14.5rem;
      background-color: white;
      border-radius: 4px;
      box-shadow: 0px 4px 6px 0px rgba(0,0,0,0.1);
      overflow-y: auto;
      z-index: 10;
      transition: max-height 300ms ease-in-out;
    }
    ul.hidden {
      max-height: 0;
    }
    ul li {
      padding: 0.25rem 0.75rem;
      color: #5a626f;
      cursor: pointer;

      &:hover { background-color: #e1e4e7; }
      &:first-child { padding-top: 0.5rem; }
      &:last-child { padding-bottom: 0.5rem; }
    }
  } /* .group */

  .group select { width: 100%; }
  .group .select { display: block; }

  .group.column {
    margin-bottom: 1rem;
  }

  .tax-invoice-address {
    .header {
      margin-bottom: 1rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      column-gap: 1rem;
    }
    
    .content {
      margin-bottom: 1.5rem;
      padding: 1rem;
      border: 1px solid #d8d8d8;
      border-radius: 0.25rem;
    }
    .content.hidden {
      display: none;
    }

    label.switch {
      margin-bottom: 0;
      position: relative;
      width: 3.5rem;
      height: 2rem;
      background-color: #bfbfbf;
      border-radius: 1rem;
      transition: background-color 200ms ease-in-out;
    }
    label.switch:has(input.switch:checked) {
      background-color: deeppink;
    }
    input.switch {
      margin: 0;
      width: 0;
      height: 0;
      opacity: 0;
      border: 0;
    }
    input.switch:checked + .thumb {
      transform: translateX(1.75rem);
    }
    .thumb {
      margin-top: auto;
      margin-bottom: auto;
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      width: 1.5rem;
      height: 1.5rem;
      background-color: #fff;
      border-radius: 0.75rem;
      cursor: pointer;
      transform: translateX(0.25rem);
      transition: transform 200ms ease-in-out;
    }
  }

  .use-same-delivery-address {
    margin-bottom: 1rem;
    display: flex;
    column-gap: 8px;
    align-items: center;
    label { margin-bottom: 0; }
  }
}
