/*
 * 고객센터의 FAQ, 1:1 문의, 다운로드 화면에서 함께 사용하는 탭과 FAQ UI입니다.
 */

.customer-tabs-section {
  padding: 60px 0 44px;
}

.customer-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #dedfe4;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(18, 22, 31, 0.06);
}

.customer-tabs__item {
  position: relative;
  display: grid;
  min-height: 64px;
  place-items: center;
  border: 0;
  border-right: 1px solid #dedfe4;
  background: #ffffff;
  color: #5d5f68;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: background-color 160ms ease, color 160ms ease;
}

.customer-tabs__item:last-child {
  border-right: 0;
}

.customer-tabs__item:hover,
.customer-tabs__item:focus-visible {
  background: #fffaf0;
  color: #191d28;
}

.customer-tabs__item.is-active {
  background: #191d28;
  color: #ffffff;
}

.customer-panel[hidden] {
  display: none;
}

.faq-section {
  padding: 0 0 132px;
}

.faq-shell {
  width: min(calc(100% - 96px), 1720px);
  margin-inline: auto;
}

.faq-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.faq-heading h2 {
  color: #191d28;
  font-size: 34px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.faq-heading > p {
  color: #717182;
  font-size: 15px;
  line-height: 1.6;
}

.faq-categories {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
  border: 1px solid #dfe1e6;
  border-radius: 10px;
  background: #f7f7f9;
}

.faq-category {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-right: 1px solid #dfe1e6;
  background: transparent;
  color: #717182;
  font-size: 16px;
  font-weight: 750;
  transition: background-color 160ms ease, color 160ms ease;
}

.faq-category:last-child {
  border-right: 0;
}

.faq-category span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #e7e8ec;
  color: #717182;
  font-size: 11px;
}

.faq-category:hover,
.faq-category:focus-visible {
  background: #fffaf0;
  color: #191d28;
}

.faq-category.is-selected {
  background: #f1bb1d;
  color: #151515;
}

.faq-category.is-selected span {
  background: rgba(0, 0, 0, 0.12);
  color: #151515;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  overflow: hidden;
  border: 1px solid #e2e2e7;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(18, 22, 31, 0.025);
}

.faq-item[hidden] {
  display: none;
}

.faq-item__question {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 72px;
  padding: 0 24px;
  background: #ffffff;
  color: #191d28;
  text-align: left;
  transition: background-color 160ms ease;
}

.faq-item__question:hover,
.faq-item__question:focus-visible,
.faq-item__question[aria-expanded="true"] {
  background: #faf9f5;
}

.faq-item__category {
  display: inline-grid;
  width: 88px;
  min-height: 32px;
  place-items: center;
  border: 1px solid rgba(177, 129, 0, 0.28);
  border-radius: 6px;
  background: rgba(241, 187, 29, 0.1);
  color: #8a670b;
  font-size: 13px;
  font-weight: 800;
}

.faq-item__title {
  min-width: 0;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.45;
}

.faq-item__icon {
  position: relative;
  width: 22px;
  height: 22px;
  justify-self: end;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  border-radius: 99px;
  background: #717182;
  transform: translate(-50%, -50%);
  transition: transform 180ms ease;
}

.faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item__question[aria-expanded="true"] .faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.faq-item__answer {
  padding: 28px 52px 34px 138px;
  border-top: 1px solid #ececf0;
  background: #f7f7f9;
  color: #4f525c;
  font-size: 14px;
  line-height: 1.8;
}

.faq-item__answer[hidden] {
  display: none;
}

.faq-item__answer p + p,
.faq-item__answer p + ul,
.faq-item__answer p + ol,
.faq-item__answer ul + p,
.faq-item__answer ol + p {
  margin-top: 14px;
}

.faq-item__answer ul,
.faq-item__answer ol {
  display: grid;
  gap: 6px;
  padding-left: 20px;
}

.faq-item__answer ul {
  list-style: disc;
}

.faq-item__answer ol {
  list-style: decimal;
}

.faq-item__answer strong {
  color: #30333d;
  font-weight: 750;
}

.faq-item__answer a {
  color: #9a7000;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-item__note {
  color: #8a670b;
}

.faq-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 4px;
}

.faq-spec-grid section {
  overflow: hidden;
  border: 1px solid #dfe1e6;
  border-radius: 8px;
  background: #ffffff;
}

.faq-spec-grid h4 {
  padding: 12px 16px;
  background: #252b38;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.faq-spec-grid dl {
  padding: 8px 16px 14px;
}

.faq-spec-grid dl div {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 12px;
  padding: 6px 0;
}

.faq-spec-grid dt {
  color: #717182;
  font-size: 12px;
  font-weight: 700;
}

.faq-spec-grid dd {
  color: #30333d;
  font-size: 12px;
  text-align: right;
}

.faq-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.faq-links a,
.faq-item__inquiry-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid #d6b354;
  border-radius: 8px;
  background: #fffaf0;
  color: #725400;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}

.faq-item__inquiry-link {
  margin-top: 18px;
}

@media (max-width: 1199px) {
  .faq-shell {
    width: min(calc(100% - 64px), 1720px);
  }
}

@media (max-width: 899px) {
  .customer-tabs-section {
    padding-top: 24px;
    padding-bottom: 28px;
  }

  .customer-tabs__item {
    min-height: 54px;
    font-size: 14px;
  }

  .faq-section {
    padding-bottom: 76px;
  }

  .faq-heading {
    align-items: start;
    flex-direction: column;
    margin-bottom: 24px;
  }

  .faq-heading h2 {
    font-size: 28px;
  }

  .faq-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .faq-category:nth-child(2) {
    border-right: 0;
  }

  .faq-category:nth-child(-n + 2) {
    border-bottom: 1px solid #dfe1e6;
  }

  .faq-item__question {
    grid-template-columns: 72px minmax(0, 1fr) 24px;
    gap: 12px;
    min-height: 68px;
    padding: 10px 14px;
  }

  .faq-item__category {
    width: 68px;
    font-size: 12px;
  }

  .faq-item__title {
    font-size: 14px;
  }

  .faq-item__answer {
    padding: 22px 18px 26px;
  }

  .faq-spec-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .faq-shell {
    width: calc(100% - 24px);
  }
}

@media (max-width: 520px) {
  .customer-tabs {
    border-radius: 9px;
  }

  .customer-tabs__item {
    min-height: 48px;
    padding-inline: 4px;
    font-size: 13px;
  }

  .faq-category {
    min-height: 52px;
    font-size: 14px;
  }

  .faq-item__question {
    grid-template-columns: minmax(0, 1fr) 22px;
  }

  .faq-item__category {
    display: none;
  }

  .faq-spec-grid dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .faq-spec-grid dd {
    text-align: left;
  }
}
