/* =========================================================
   인증정보 조회 (search.html) 전용 스타일
   - style.css 의 디자인 토큰(:root 변수)을 그대로 사용합니다.
   - 탭 버튼은 메인 페이지의 .finder-tabs 스타일을 재사용합니다.
   ========================================================= */

.sx { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.sx-tabs { background: #fff; }
.sx-panel { padding: 36px 40px 40px; }
.sx-panel[hidden] { display: none; }
.sx-panel:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.sx-head { margin-bottom: 24px; }
.sx-head h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 8px; }
.sx-head p { color: var(--ink-3); font-size: 15px; max-width: 860px; }
.sx-head p b { color: var(--ink-2); }
.sx-head a { color: var(--brand); font-weight: 700; }

/* 검색 폼 */
.sx-form { display: grid; grid-template-columns: 220px 1fr auto; gap: 14px 12px; align-items: end; padding: 22px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.sx-form .sx-q-wide { grid-column: 1 / 3; }
.sx-form-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.sx-form .field select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
.sx-btn { height: 52px; min-width: 120px; }
.sx-btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.sx-hint { grid-column: 1 / -1; margin-top: -2px; font-size: 13px; color: var(--ink-3); }

/* 상태 메시지 */
.sx-status:empty { display: none; }
.sx-status { margin-top: 20px; display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); font-size: 15px; color: var(--ink-2); background: var(--brand-50); border: 1px solid #cfdcff; }
.sx-status.is-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.sx-status.is-error { background: #fff1f2; border-color: #fecdd3; }
.sx-status.is-ok { background: #ecfdf5; border-color: #a7f3d0; }
.sx-status strong { color: var(--ink); }
.sx-spin { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 2.5px solid #c7d6ff; border-top-color: var(--brand); animation: sx-spin .8s linear infinite; }
@keyframes sx-spin { to { transform: rotate(360deg); } }

/* 결과 표 */
.sx-result:empty { display: none; }
.sx-result { margin-top: 18px; }
.sx-result .table-wrap { max-height: 560px; overflow: auto; }
.sx-result .tbl { font-size: 14.5px; }
.sx-result .tbl thead th { position: sticky; top: 0; z-index: 1; }
.sx-result .tbl td small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.sx-result .tbl a { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.sx-result .tbl .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; white-space: nowrap; }
.sx-kv .tbl { min-width: 0; }
.sx-kv .tbl tbody th { width: 180px; }
.sx-meta { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.sx-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2); }
.sx-badge.ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.sx-badge.bad { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.sx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sx-chips span { padding: 3px 10px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 13px; }

/* 공식 사이트 바로가기 */
.sx-links { margin-top: 28px; padding-top: 24px; border-top: 1px dashed var(--line); }
.sx-links h4 { font-size: 15px; font-weight: 800; margin: 0 0 12px; color: var(--ink); }
.sx-link-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.sx-link { display: block; width: 100%; text-align: left; padding: 16px 44px 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; font: inherit; color: inherit; cursor: pointer; position: relative; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.sx-link::after { content: "\2197"; position: absolute; right: 16px; top: 16px; font-weight: 700; color: var(--ink-3); transition: color .2s; }
.sx-link[href^="#"]::after { content: "\2193"; }
.sx-link:hover, .sx-link:focus-visible { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.sx-link:hover::after { color: var(--brand); }
.sx-link strong { display: block; font-size: 15px; margin-bottom: 4px; }
.sx-link span { display: block; font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }
.sx-link[hidden] { display: none; }
.sx-link.is-primary { border-color: var(--brand); background: var(--brand-50); }
.sx-links.is-flash .sx-link-list { animation: sx-flash 1.2s var(--ease); border-radius: var(--radius); }
@keyframes sx-flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(31, 94, 255, 0); } 30% { box-shadow: 0 0 0 6px rgba(31, 94, 255, .18); } }
.sx-note { margin-top: 12px; font-size: 13px; color: var(--ink-3); }

.sx-callout { margin-top: 28px; }

/* 국가별 공식 조회 사이트 */
.sx-dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.sx-card { display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: all .25s var(--ease); }
.sx-card:hover, .sx-card:focus-visible { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.sx-card .tag { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--brand-50); padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.sx-card strong { font-size: 17px; margin-bottom: 6px; }
.sx-card > span:not(.tag) { font-size: 14px; color: var(--ink-3); line-height: 1.6; flex: 1; }
.sx-card em { margin-top: 14px; font-style: normal; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sx-card em::after { content: " \2197"; color: var(--brand); }

@media (max-width: 1024px) {
  .sx-form-3 { grid-template-columns: 1fr 1fr; }
  .sx-form-3 .sx-btn { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .sx-panel { padding: 24px 18px 28px; }
  .sx-head h3 { font-size: 19px; }
  .sx-form, .sx-form-3 { grid-template-columns: 1fr; padding: 16px; }
  .sx-form .sx-q-wide { grid-column: auto; }
  .sx-btn { width: 100%; }
  .sx-kv .tbl tbody th { width: 110px; white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-spin { animation-duration: 2s; }
  .sx-links.is-flash .sx-link-list { animation: none; }
}
@media print {
  .sx-form, .sx-links, .sx-tabs { display: none !important; }
}
