:root {
  --color: rgb(36, 112, 224);
  --color-light: rgb(60, 137, 252);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.main {
  padding: 1rem;
  margin-inline: auto;
  max-width: 78.1333rem;
  background-color: white;
  width:100%;
}

.form-header {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-block-end: 1.5rem;
}

.form-header-item {
  text-align: center;
  margin: 0;
  position: relative;
  z-index: 1;

  &:before {
    content: "";
    height: 4px;
    left: 0;
    right: 0;
    position: absolute;
    top: 1rem;
    background-color: #ddd;
    z-index: -2;
  }

  dt {
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    border: solid 1px #ddd;
    border-radius: 50%;
    text-align: center;
    display: inline-block;
    font-size: 0.9em;
    background-color: white;

    &:before {
      content: "";
      height: 4px;
      left: 0;
      right: 0;
      position: absolute;
      top: 1rem;
      background-color: transparent;
      z-index: -1;
    }
  }

  dd {
    margin-block-start: 0.5rem;
    color: #999;
  }
}

[data-form="form-1"] .form-header-item:nth-child(1),
[data-form="form-2"] .form-header-item:nth-child(2),
[data-form="form-3"] .form-header-item:nth-child(3) {
  &:before,
  dt:before {
    background-color: hsl(var(--base));
  }

  dd {
    color: black;
    font-weight: 500;
  }
}

.form-wrap {
  display: none;
}

.form {
  h2 {
    font-size: 1.75em;
    margin-block-end: 1rem;

    ~ h2 {
      margin-block-start: 1em;
    }
  }

  label,
  .form-label {
    display: block;

    strong {
      display: block;
      margin-block-end: 0.5rem;
      cursor: pointer;
      font-size: 0.85em;

      span {
        color: red;
        font-weight: 700;
      }
    }
  }
  label {
    input,
    textarea,
    select {
      border: solid 1px #dadada;
      border-radius: 5px;
      padding: 1rem;
      width: 100%;
      font-size: 1em;
    }
  }

  select {
    appearance: none;
    position: relative;

    &::before {
      content: "";
      display: block;
      width: 0.75rem;
      height: 0.75rem;
      border: solid black;
      border-width: 0 2px 2px 0;
      position: absolute;
      right: 0;
      top: 0;
      z-index: 1;
    }
  }
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-row,
.form-label {
  ~ .form-row,
  ~ .form-label {
    margin-block-start: 1.25rem;
  }
}

.form-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-block-start: 0.5rem;

  label {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    cursor: pointer;

    input {
      width: 1rem;
      height: 1rem;
    }
  }
}

.form-note {
  margin-block-start: 0.5rem;
  font-size: 0.9em;
}

.form-note-head {
  font-weight: 400;
}

.form-footer {
  margin-block-start: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.form-btn {
  background-color: hsl(var(--base));
  color: white;
  padding: 0.9em 1.5em;
  border-radius: 5px;
  border: none;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

[data-form="form-1"] .form-1,
[data-form="form-2"] .form-2,
[data-form="form-3"] .form-3,
[data-form="form-4"] .form-4 {
  display: block;
}

[data-form="form-4"] {
  .search-header {
    display: flex;
  }
  .form-header {
    display: none;
  }
}

.form table {
  width: 100%;
  text-align: left;
  border: solid 1px #ddd;
  border-spacing: 0;
}

.form tr td,
.form tr th {
  padding: 0.75rem;
}

.form table tr + tr {
  th,
  td {
    border-top: solid 1px #ddd;
  }
}

.form tr td {
  border-left: solid 1px #ddd;
}

.accordion:not(.active) .accordion-content {
  display: none;
}

.accordion h3 {
  cursor: pointer;
  border-bottom: solid 1px #dadada;
  padding-block-end: 0.5rem;
  margin-block-end: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25em;
  align-items: baseline;
  span {
    font-weight: 300;
    font-size: 0.8em;
  }

  &:after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border: solid #000;
    display: inline-block;
    border-width: 0 3px 3px 0;
    transform: translate(-3px, -2px) rotate(45deg);
    margin-inline-start: auto;
  }
}

.accordion.active h3:after {
  transform: translate(-3px, 2px) rotate(-135deg);
}

.details-container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.detail-item {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.label {
  text-transform: uppercase;
  color: #555;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 4px;
}

.value {
  color: #2d3e50;
  font-weight: 700;
  font-size: 16px;
}

/* Optional: vertical dotted dividers */
.detail-item:not(:last-child) {
  border-right: 1px dotted #ccc;
  padding-right: 30px;
}

.form-4 h1 {
  font-size: 26px;
}
.form-4 h3 {
  font-size: 18px;
  margin-bottom: 2rem;
}
.frm4tbl tbody td {
  color: #4b4747;
  width: 55%;
}
.frm4tbl thead th {
  border-bottom: 1px solid #e4e4e4;
}
.frm4tbl .table-payment-method {
  font-weight: 600;
}
.frm4tbl a {
  font-weight: 100;
  text-decoration: none;
}
.methods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-block-start: 0.5rem;

  label {
    cursor: pointer;

    input {
      display: none;
    }

    span {
      display: block;
      background-color: #efefef;
      border-radius: 3px;
      padding: 0.25rem;
      border: solid 1px #e4e4e4;
      transition-property: color, background-color;
      transition-duration: 300ms;
      transition-timing-function: linear;

      img {
        width: 5.5rem;
        height: 1.5rem;
        object-fit: contain;
        vertical-align: middle;
      }
    }

    input:checked + span {
      border-color: var(--color);
      background-color: transparent;
    }
  }
}

.accordion + .accordion {
  margin-block-start: 1.5rem;
}

.method-form {
  margin-block-start: 1.5rem;
}

.method-form .form-btn {
  margin-block-start: 1rem;
  margin-inline-start: auto;
  display: block;
}

.accordion.active h3 {
}

.form-area .form-area-loader:first-child:last-child {
  width: 48px;
  height: 48px;
  border: 5px solid var(--color);
  border-bottom-color: transparent;
  border-radius: 50%;
  display: block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
  margin: 8rem auto;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.form-area + p {
  margin-top: 1rem;
}

.form-loader {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.95);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  display: none;
  z-index: 9999;

  &.active {
    display: flex;
  }

  &:before {
    content: "";
    width: 80px;
    height: 80px;
    border: 7px solid var(--color);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin: 8rem auto;
  }
}

.swal2-input {
  text-align: center;
}

.search-header {
  background-color: #efefef;
  text-align: center;
  padding: 1rem;
  min-height: 20vw;
  display: none;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: -1rem -1rem 0;

  &:before {
    content: "";
    background-color: #efefef;
    position: absolute;
    left: 0;
    right: 0;
    z-index: -1;
    min-height: 20vw;
  }

  h1 {
    font-size: clamp(2em, 5vw, 3em);
    margin-block-end: 1rem;
    color: var(--color);
  }

  p {
    font-size: 2.5em;
    margin: 0;
  }
}

.form-4 {
  padding: 5rem 2rem;
  text-align: center;

  h2 {
    font-weight: 400;
  }
}

.voucher-btn {
  font-size: 1.3em;
}

.global-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem 1rem;
  max-width: 78.1333rem;
  margin-inline: auto;

  .global-logo {
    img {
      width: 150px;
      height: auto;
    }
  }

  .global-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .global-search {
    padding: 1rem 1.5rem;
    border-radius: 50px;
    background-color: var(--color);
    color: white;
    text-decoration: none;
    transition: background-color 300ms linear;

    &:hover {
      background-color: var(--color-light);
    }
  }
}