/* 
 * File     : components.css
 * Author   : PSH (shpark7502@gmail.com)
 */
/* *********************************************** *
 * Root
 * *********************************************** */
:root {
  --modal-border-radius: 4px;
  --modal-inner-border-radius: calc(var(--modal-border-radius) - 1px);
  --modal-max-width: 500px;
  --modal-margin: 28px;
  --modal-inner-padding-x: 24px;
  --modal-zindex: 1055;
  --modal-shadow: 0 6px 26px rgba(0, 0, 0, 0.18);
}

/* *********************************************** *
 * Tab
 * *********************************************** */
.tab__button--wrapper {
  background-color: #fff;
  transition: transform 0.4s;
}
.tab__button--wrapper .tab__button {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: #6d6d6d;
  height: 64px;
  background-color: #fafafa;
  outline: none;
}
.tab__button--wrapper .tab__button.active {
  color: #fff;
  background-color: #3e476a !important;
}
.tab__button--wrapper.type--text {
  --button-gap: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--button-gap);
  font-size: 0;
  text-align: center;
}
.tab__button--wrapper.type--text .tab__button {
  position: relative;
  display: inline-block;
  align-items: unset;
  justify-content: unset;
  font-size: 22px;
  color: #454545;
  height: auto;
  border: none;
  background-color: transparent !important;
}
.tab__button--wrapper.type--text .tab__button + .tab__button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: calc(var(--button-gap) / -2);
  display: inline-block;
  width: 1px;
  height: 20px;
  margin-top: -10px;
  background-color: #3d3d3d;
}
.tab__button--wrapper.type--text .tab__button.active {
  font-weight: 700;
  color: #0064dd;
}
.tab__button--wrapper.tab--sticky {
  position: fixed;
  top: 135px;
  width: 1420px;
  z-index: 500;
}

#header.scroll--up ~ #container .tab__button--wrapper.tab--sticky {
  transform: translateY(-280px);
}

/* *********************************************** *
 * Heading
 * *********************************************** */
.deco__heading--line {
  position: relative;
  font-size: 28px;
  font-weight: 600;
  color: #000;
  line-height: 1.19;
  margin-bottom: 24px;
  padding-left: 18px;
}
.deco__heading--line::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 3px;
  height: 22px;
  background-color: #5e7bee;
}

/* *********************************************** *
 * Table
 * *********************************************** */
.primary__table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid #000;
  border-bottom: 1px solid #3d3d3d;
}
.primary__table th,
.primary__table td {
  padding: 18px 12px;
  text-align: center;
  vertical-align: middle;
}
.primary__table th {
  font-size: 18px;
  font-weight: 700;
  color: #3d3d3d;
  border-bottom: 1px solid #000;
  background-color: #f4f6ff;
}
.primary__table tbody th {
  border-bottom: 0;
}
.primary__table tbody th {
  font-weight: 700;
  color: #3d3d3d;
  font-size: 18px;
}
.primary__table tbody tr td {
  font-weight: 500;
  color: #4f4f4f;
  padding: 18px 12px;
}
.primary__table tbody tr + tr th,
.primary__table tbody tr + tr td {
  border-top: 1px solid #c4c8d3;
}
.primary__table.table--sm thead th {
  font-size: 18px;
  padding: 18px 12px;
}
.primary__table.table--sm tbody th,
.primary__table.table--sm tbody td {
  padding: 18px 12px;
}
.primary__table.table--sm tbody th {
  font-size: 18px;
}
.primary__table.table--sm tbody td {
  font-size: 15px;
}

.secondary__table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}
.secondary__table th,
.secondary__table td {
  line-height: 1.16;
  text-align: center;
  padding: 20px 12px;
}
.secondary__table th {
  font-weight: 700;
  color: #3d3d3d;
  background-color: #fafafa;
}
.secondary__table td {
  color: #4f4f4f;
  font-weight: 500;
}
.secondary__table tbody tr + tr td {
  border-top: 1px solid #c4c8d3;
}

/* *********************************************** *
 * Form fields
 * *********************************************** */
.form__control {
  display: block;
  width: 100%;
  height: 54px;
  font-size: 16px;
  color: #000;
  padding: 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #fff;
  outline: none;
}
.form__control::-moz-placeholder {
  color: #6b7280;
}
.form__control::placeholder {
  color: #6b7280;
}
.form__control:focus {
  border-color: #000;
  box-shadow: inset 0 0 0 1px #000;
}
.form__control--login {
  display: block;
  width: 100%;
  height: 45px;
  padding: 0 16px;
  font-size: 14px;
  color: #000;
  border: 1px solid #d8d8d8;
  background-color: #fafafa;
  outline: none;
}
.form__control--login::-moz-placeholder {
  color: #999;
}
.form__control--login::placeholder {
  color: #999;
}
.form__control--login:focus {
  border-color: #000;
  background-color: #fff;
}
.form__control--register {
  display: block;
  width: 100%;
  height: 40px;
  font-size: 15px;
  color: #3d3d3d;
  padding: 0 12px;
  border: 1px solid #d8d8d8;
  background-color: #fff;
  outline: none;
}
.form__control--register:focus {
  color: #000;
  border-color: #000;
}

select.form__control--register,
datalist.form__control--register {
  padding-right: 24px;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url(../images/select_arrow_icon.svg);
  background-size: 9px auto;
  background-position: right 16px center;
  background-repeat: no-repeat;
  cursor: pointer;
}

.custom__check--wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.custom__check--wrapper .custom__check {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1px solid #cbd5e1;
  background-color: #fff;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  cursor: pointer;
}
.custom__check--wrapper .custom__check::after {
  content: "";
  position: absolute;
  display: block;
  top: 4px;
  left: 4px;
  width: 10px;
  height: 6px;
  border-left: 1px solid #3d3d3d;
  border-bottom: 1px solid #3d3d3d;
  transform: rotate(-45deg);
  opacity: 0;
}
.custom__check--wrapper .custom__check:checked {
  border-color: #3d3d3d;
}
.custom__check--wrapper .custom__check:checked::after {
  opacity: 1;
}
.custom__check--wrapper .custom__check[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.custom__check--wrapper .custom__check[disabled] + label {
  cursor: not-allowed;
}
.custom__check--wrapper label {
  font-weight: 600;
  color: #3d3d3d;
  cursor: pointer;
}

/* *********************************************** *
 * Buttons
 * *********************************************** */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  height: 46px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.button--default {
  color: #000;
  border-color: #d1d5db;
}
.button--default:hover {
  background-color: #f9fafb;
}
.button--black {
  color: #fff;
  background-color: #000;
}
.button--lg {
  font-size: 18px;
  height: 60px;
  padding: 0 20px;
  border-radius: 8px;
}

/* *********************************************** *
 * Modal
 * *********************************************** */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: var(--modal-zindex);
}
.modal__dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: auto;
  min-height: calc(100% - var(--modal-margin) * 2);
  margin: var(--modal-margin);
  pointer-events: none;
}
.modal__content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: var(--modal-border-radius);
  background-color: #fff;
  background-clip: padding-box;
  box-shadow: var(--modal-shadow);
  pointer-events: auto;
  outline: 0;
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--modal-inner-padding-x);
  border-top-left-radius: var(--modal-inner-border-radius);
  border-top-right-radius: var(--modal-inner-border-radius);
  border-bottom: 1px solid #eaeaea;
}
.modal__header h1 {
  font-size: 20px;
  font-weight: 600;
  color: #000;
}
.modal__body {
  padding: var(--modal-inner-padding-x);
}
.modal .close__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #5d5d5d;
  outline: 0;
  cursor: pointer;
}
.modal .close__button:hover {
  color: #3d3d3d;
}
.modal.open {
  display: block;
}

/* *********************************************** *
 * Media queries
 * *********************************************** */
@media (min-width: 576px) {
  .modal__dialog {
    max-width: var(--modal-max-width);
    margin-left: auto;
    margin-right: auto;
  }
}
@media (min-width: 768px) {
  .tab__button--wrapper .tab__button:hover {
    background-color: #e6eaf7;
  }
}
@media (max-width: 1023px) {
  .tab__button--wrapper.tab--sticky {
    top: 118px;
    max-width: 728px;
  }
}
@media (max-width: 767px) {
  .tab__button--wrapper {
    transition-duration: 0.35s;
  }
  .tab__button--wrapper .tab__button {
    font-size: 15px;
    height: 48px;
  }
  .tab__button--wrapper.type--text {
    --button-gap: 48px;
  }
  .tab__button--wrapper.type--text .tab__button {
    font-size: 18px;
  }
  .tab__button--wrapper.type--text .tab__button + .tab__button::before {
    height: 14px;
    margin-top: -7px;
  }
  .tab__button--wrapper.tab--sticky {
    display: flex !important;
    top: calc(var(--header-height) - 1px);
    left: 0;
    width: 100%;
  }
  .tab__button--wrapper.tab--sticky .dropdown__button {
    border-left: 0;
    border-right: 0;
  }
  .tab__button--wrapper .dropdown__wrapper {
    position: relative;
  }
  .tab__button--wrapper .dropdown__wrapper .dropdown__button {
    position: relative;
    font-size: 15px;
    font-weight: 500;
    width: 100%;
    height: 48px;
    padding: 0 20px;
    text-align: left;
    border: 1px solid #dee2e6;
    background-color: #fff;
  }
  .tab__button--wrapper .dropdown__wrapper .dropdown__button::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    display: block;
    width: 10px;
    height: 10px;
    background-image: url(../images/select_arrow_icon.svg);
    background-size: 10px auto;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateY(-50%);
  }
  .tab__button--wrapper .dropdown__wrapper .dropdown__content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: -1px;
    border: 1px solid #dee2e6;
    background-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    z-index: 10;
  }
  .tab__button--wrapper .dropdown__wrapper .tab__button {
    width: 100%;
    height: 40px;
    font-size: 15px;
    padding: 0 20px;
    background-color: #fff;
    justify-content: flex-start;
  }
  #header.scroll--up ~ #container .tab__button--wrapper.tab--sticky {
    transform: translateY(calc((var(--header-height) + 100%) * -1));
  }
  .primary__table th,
  .primary__table td {
    padding: 16px 12px;
  }
  .primary__table th {
    font-size: 16px;
  }
  .primary__table tbody th {
    font-size: 16px;
  }
  .primary__table tbody tr td {
    font-size: 15px;
    padding: 16px 12px;
  }
  .primary__table.table--sm thead th {
    font-size: 15px;
    padding: 16px 12px;
  }
  .primary__table.table--sm tbody th,
  .primary__table.table--sm tbody td {
    padding: 16px 12px;
  }
  .primary__table.table--sm tbody th {
    font-size: 14px;
  }
  .primary__table.table--sm tbody td {
    font-size: 14px;
  }
  .secondary__table th,
  .secondary__table td {
    font-size: 15px;
    padding: 16px 12px;
  }
  .form__control {
    height: 48px;
    font-size: 15px;
  }
  .custom__check--wrapper .custom__check {
    width: 16px;
    height: 16px;
  }
  .custom__check--wrapper .custom__check::after {
    top: 3px;
    left: 3px;
    width: 8px;
    height: 5px;
  }
  .custom__check--wrapper label {
    font-size: 15px;
  }
  .button {
    font-size: 15px;
  }
  .button--lg {
    font-size: 16px;
    height: 56px;
  }
  .deco__heading--line {
    font-size: 22px;
    margin-bottom: 20px;
    padding-left: 16px;
  }
  .deco__heading--line::before {
    top: 5px;
    width: 2px;
    height: 16px;
  }
}