@import url("./theme.css");
@import url("./sweetalert.css");

/* 共用 */
.w-50 {
  width: 50%;
}

body {
  min-width: 360px;
}

.header {
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  margin: 1rem 15px;
}

.header-logo {
  max-width: 36rem;
  img {
    width: 100%;
    height: auto;
  }
}

.header-survey {
  position: relative;
  display: flex !important;
  gap: 0.5rem;
  justify-content: start;
  align-items: center;
  padding-left: 4.5rem !important;
  color: var(--orange-color);

  &:hover {
    color: var(--orange-color);
  }
  &:focus {
    color: var(--orange-color);
  }

  img {
    width: 36px;
    position: absolute;
    left: 5px;
    top: 0px;
  }
}

/* 控制欄位 */
.nav-tabs li {
  font-size: var(--font-size-lg);
}
.nav-tabs li.active a {
  border-radius: 0px;
}

.calculate-title {
  display: block;
  font-size: var(--font-size-xl);
  font-weight: bold;
  margin-bottom: 1rem;
}

.calculate-info {
  display: block;
  font-size: var(--font-size-base);
  color: red;
}

/* 表單樣式 */

.tab-wrapper.active {
  display: grid;
  gap: 1.5rem;
  padding: 15px;
}

.form-wrapper {
  width: 50%;
}

.form-wrapper-half {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: var(--font-size-lg);
  span {
    font-size: var(--font-size-xxl);
  }
}

.form-label {
  width: 240px;
  font-size: var(--font-size-lg);
}
.form-label-footer {
  max-width: 15%;
  font-size: var(--font-size-lg);
}

.form-field {
  width: 100%;
  font-size: var(--font-size-lg);
}

.btn-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
  margin-bottom: 3rem;
}

.btn-submit {
  margin-top: 1rem;
  width: 150px;
  margin: 0 auto;
  font-size: var(--font-size-lg);
}

/* 規費說明 */
.fee-info {
  font-size: var(--font-size-lg);
  list-style-position: inside;

  li {
    margin-bottom: 1rem;
  }
}

.fee-title {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: var(--font-size-xl);
  font-weight: bold;
}

.fee-info-danger {
  color: var(--danger-color);
}

/* 列表 */
.table-base {
  font-size: var(--font-size-base);
  text-align: center;
  max-height: 300px;
  overflow-y: auto;

  th {
    text-align: inherit;
    background-color: var(--light-gray-color);
  }
  td {
    align-content: center;
  }
}

.btn-add-row {
  display: block;
  margin-left: auto;
}

@media (max-width: 1024px) {
  .nav-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    transition: 0.4s ease-in-out;

    /* 隱藏多餘的標籤 */
    &::before,
    &::after {
      display: none;
    }
    li.active {
      a {
        border: 2px dotted var(--primary-color) !important;
      }
      a:active {
        border: 2px dotted var(--primary-color) !important;
        background-color: #8ec8ff !important;
      }
    }
  }
  .form-wrapper {
    width: 100%;
  }

  .form-field {
    font-size: var(--font-size-base);
  }
  .form-label {
    font-size: var(--font-size-base);
    width: 40%;
  }

  .btn-submit {
    margin-top: 0.5rem;
    width: auto;
    margin: 0 auto;
    font-size: var(--font-size-base);
  }

  .fee-title {
    font-size: var(--font-size-base);
  }

  .fee-info {
    font-size: var(--font-size-base);
    padding: 0;
  }

  .calculate-title {
    font-size: var(--font-size-lg);
  }
}
