/* SITE-FOOTER-BUSINESS-INFO-01 — main-site business information footer */
.company-legal {
  font-size: 13px;
  line-height: 1.65;
}

.company-legal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 2px;
}

.company-legal-row + .company-legal-row {
  margin-top: 2px;
}

.company-separator {
  flex: 0 0 auto;
  margin: 0 6px;
  color: var(--lotbi-text-primary, var(--text, #212121));
}

@media (max-width: 760px) {
  .company-legal {
    font-size: 13px;
    line-height: 1.75;
  }

  .company-separator {
    margin-inline: 5px;
  }
}

/* SITE-HOME-SAME-URL-STABILITY-01 — progressive legal disclosure.
   Mobile is compact in the HTML/CSS first paint, not after hydration. <details>
   is the no-JS control; its adjacent single-source panel opens inline when JS
   is unavailable. When JS works, site-footer-legal.js enhances the same panel
   into the existing LOTBI bottom sheet. Desktop keeps the full footer. */

.footer-legal-disclosure {
  display: none;
}

.footer-legal-summary {
  list-style: none;
}

.footer-legal-summary::-webkit-details-marker {
  display: none;
}

.footer-legal-panels {
  display: block;
}

@media (max-width: 760px) {
  .footer-legal-disclosure {
    display: block;
  }

  .footer-legal-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 11px 0;
    border: 0;
    border-radius: 10px;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    word-break: keep-all;
    cursor: pointer;
  }

  .footer-legal-summary:focus-visible {
    outline: 3px solid rgba(79, 120, 197, .34);
    outline-offset: 2px;
  }

  .footer-legal-summary-chevron {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    fill: currentColor;
    transition: transform 160ms ease;
  }

  .footer-legal-disclosure[open] .footer-legal-summary-chevron {
    transform: rotate(180deg);
  }

  /* Closed <details> + adjacent panels is the no-JS compact state. Because the
     legal nodes remain in the DOM and the native summary toggles [open], JS
     failure never makes required information unreachable. */
  .footer-legal-disclosure:not([open]) + .footer-legal-panels {
    display: none;
  }

  .footer-legal-disclosure[open] + .footer-legal-panels {
    display: block;
  }

  .chat-home-footer {
    padding-top: 10px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

/* --- 시트 안쪽 ----------------------------------------------------------- */

/* 시트 왼쪽 위 X 하나로 닫는다. 프리미티브가 기본으로 다는 아래쪽 '닫기'
   버튼은 이 시트에서만 감춘다 — display:none 이면 포커스 순서에서도 빠지므로
   포커스 트랩이 빈 버튼을 짚지 않는다. */
.lotbi-sheet.footer-legal-sheet > .lotbi-sheet-dismiss {
  display: none;
}

.footer-legal-sheet-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 2px;
}

.footer-legal-sheet-close {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: -10px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.footer-legal-sheet-close:hover,
.footer-legal-sheet-close:focus-visible {
  background: #f0f2f6;
}

.footer-legal-sheet-close:focus-visible {
  outline: 3px solid rgba(79, 120, 197, .34);
  outline-offset: 2px;
}

.footer-legal-sheet-panels {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 6px;
}

/* 푸터 밖으로 옮겨지면 .lotbi-footer 스코프 규칙이 더 이상 닿지 않으므로,
   시트 안에서 쓸 값을 여기서 다시 준다. 화면 아래쪽 좁은 칸에서 읽는 글이라
   푸터에 있을 때(10~11px)보다 키운다. */
.footer-legal-sheet .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.footer-legal-sheet .footer-links a,
.footer-legal-sheet .company-legal a {
  color: inherit;
  text-decoration: none;
}

.footer-legal-sheet .footer-links a:hover,
.footer-legal-sheet .footer-links a:focus-visible,
.footer-legal-sheet .company-legal a:hover,
.footer-legal-sheet .company-legal a:focus-visible {
  text-decoration: underline;
}

.footer-legal-sheet .company-legal {
  max-width: none;
  font-size: 12px;
  line-height: 1.9;
  color: inherit;
}

.footer-legal-sheet .footer-service {
  margin: 0;
  font-size: 12px;
  color: inherit;
  opacity: .8;
}

body[data-site-theme="dark"] .footer-legal-sheet-close:hover,
body[data-site-theme="dark"] .footer-legal-sheet-close:focus-visible {
  background: #1e2532;
}

@media (prefers-color-scheme: dark) {
  body[data-site-theme="system"] .footer-legal-sheet-close:hover,
  body[data-site-theme="system"] .footer-legal-sheet-close:focus-visible {
    background: #1e2532;
  }
}
