/* ============================================================
   전국 법원 포털 페이지
============================================================ */
.court-page {
  width: 100%;
  padding: 30px 0 50px;
  box-sizing: border-box;
}

.court-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}

.court-portal-card {
  width: 100%;
  margin: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  box-shadow: 0 3px 14px rgba(15, 23, 42, .04);
}

.court-portal-header {
  min-height: 56px;
  padding: 14px 20px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fafbfc;
  border-bottom: 1px solid #e4e7ec;
}

.court-portal-header > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.court-portal-header strong {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.court-result-count {
  margin: 0;
  color: #2684ff;
  font-size: 11px;
  font-weight: 700;
}

.court-portal-header p {
  margin: 0;
  color: #98a2b3;
  font-size: 12px;
  line-height: 1.5;
}

/* ============================================================
   목록
============================================================ */
.court-list {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.court-list-item {
  display: block;
  width: 100%;
  margin: 0;
  padding: 17px 20px;
  box-sizing: border-box;
  background: #fff;
  border: 0 !important;
  border-bottom: 1px solid #eef0f3 !important;
  border-radius: 0;
  box-shadow: none;
  transition: background .18s ease;
}

.court-list-item:last-child {
  border-bottom: 0 !important;
}

.court-list-item:hover {
  background: #f8fafc;
  box-shadow: none;
}

.court-item-main {
  min-width: 0;
}

.court-name {
  display: block;
  margin-bottom: 11px;
  color: #344054;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.court-info-grid {
  display: grid;
  gap: 7px;
}

.court-info-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
}

.court-info-label {
  color: #475467;
  font-weight: 700;
}

.court-info-value {
  min-width: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.copy-btn {
  min-width: 44px;
  min-height: 28px;
  padding: 0 8px;
  color: #fff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  background: #2684ff;
  border: 1px solid #2684ff;
  border-radius: 5px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.copy-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.copy-btn:disabled {
  opacity: .6;
  cursor: default;
}

.court-phone {
  display: inline-flex;
  width: fit-content;
  min-height: 30px;
  padding: 0 9px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  color: #2684ff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  background: #f5f9ff;
  border: 1px solid #b2ccff;
  border-radius: 6px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.court-phone::before {
  content: "☎";
  margin-right: 5px;
  font-size: 10px;
}

.court-phone:hover {
  color: #fff;
  background: #2684ff;
  border-color: #2684ff;
}

/* ============================================================
   로딩 / 메시지
============================================================ */
.court-loading-item,
.court-message-item {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  color: #98a2b3;
  font-size: 12px;
  list-style: none;
  text-align: center;
}

.court-error-item {
  color: #dc2626;
}

.court-loading-spinner {
  width: 34px;
  height: 34px;
  box-sizing: border-box;
  border: 3px solid #e5e7eb;
  border-top-color: #2684ff;
  border-radius: 50%;
  animation: court-spin .8s linear infinite;
}

@keyframes court-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   목록 하단 검색
============================================================ */
.court-search-area {
  width: 100%;
  padding: 14px 20px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  background: #fafbfc;
  border-top: 1px solid #eef0f3;
}

.court-search-wrap {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
  margin: 0;
}

.board-search-input {
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  box-sizing: border-box;
  color: #344054;
  font-family: inherit;
  font-size: 12px;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.board-search-input::placeholder {
  color: #98a2b3;
}

.board-search-input:focus {
  border-color: #84adff;
  box-shadow: 0 0 0 3px rgba(38, 132, 255, .08);
}

.board-search-btn,
.board-reset-btn {
  min-width: 58px;
  height: 36px;
  padding: 0 11px;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 6px;
  cursor: pointer;
}

.board-search-btn {
  color: #fff;
  background: #2684ff;
  border: 1px solid #2684ff;
}

.board-search-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.board-reset-btn {
  color: #475467;
  background: #f2f4f7;
  border: 1px solid #e4e7ec;
}

.board-reset-btn:hover {
  background: #e4e7ec;
}

/* ============================================================
   페이징
============================================================ */
.court-paging {
  width: 100%;
  margin: 0;
  padding: 18px 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid #eef0f3;
}

.court-paging:empty {
  display: none;
}

.paging-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #475467;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 5px;
  cursor: pointer;
}

.paging-btn:hover:not(:disabled):not(.active) {
  color: #2684ff;
  background: #f8faff;
  border-color: #84adff;
}

.paging-btn.active {
  color: #fff;
  font-weight: 700;
  background: #2684ff;
  border-color: #2684ff;
}

.paging-btn:disabled {
  color: #b8c0cc;
  background: #f8fafc;
  border-color: #e4e7ec;
  cursor: default;
}

.paging-summary {
  margin-left: 6px;
  color: #98a2b3;
  font-size: 10px;
  white-space: nowrap;
}

/* ============================================================
   안내 / 하단 CTA
============================================================ */
.court-guide {
  margin-top: 14px;
  padding: 12px 14px;
  box-sizing: border-box;
  color: #667085;
  font-size: 11px;
  line-height: 1.6;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
}

.court-page-footer {
  width: 100%;
  margin-top: 18px;
  padding-top: 18px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #e4e7ec;
}

.court-footer-home {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.court-footer-home:hover {
  color: #2684ff;
}

.court-footer-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.court-footer-action span {
  color: #667085;
  font-size: 12px;
}

.court-calc-cta {
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: #2684ff;
  border: 1px solid #2684ff;
  border-radius: 8px;
  transition: background .18s ease, border-color .18s ease;
}

.court-calc-cta:hover {
  color: #fff;
  background: #1d4ed8;
  border-color: #1d4ed8;
}

/* ============================================================
   태블릿
============================================================ */
@media (max-width: 768px) {
  .court-page { padding: 24px 0 42px; }
  .court-container { padding: 0 14px; box-sizing: border-box; }
  .court-portal-header { padding: 14px 18px; align-items: flex-start; flex-direction: column; gap: 4px; }
  .court-list-item { padding: 16px 18px; }
  .court-search-area { padding: 13px 18px; }
  .court-search-wrap { max-width: 100%; }
  .court-page-footer { align-items: flex-start; flex-direction: column-reverse; gap: 14px; }
  .court-footer-action { width: 100%; align-items: stretch; flex-direction: column; gap: 7px; }
  .court-calc-cta { width: 100%; min-height: 44px; }
  .court-footer-home { align-self: flex-end; }
}

/* ============================================================
   모바일
============================================================ */
@media (max-width: 480px) {
  .court-page { padding: 20px 0 36px; }
  .court-container { padding: 0; }
  .court-portal-card { border-radius: 10px; }
  .court-portal-header { padding: 12px 16px; }
  .court-portal-header strong { font-size: 13px; }
  .court-portal-header p { font-size: 11px; }
  .court-list-item { padding: 14px 16px; }
  .court-name { margin-bottom: 10px; font-size: 14px; }
  .court-info-row { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 6px; font-size: 11px; }
  .copy-btn { min-width: 40px; min-height: 27px; font-size: 9px; }
  .court-phone { min-height: 28px; padding: 0 7px; font-size: 10px; }
  .court-search-area { padding: 12px 16px; }
  .court-search-wrap { grid-template-columns: minmax(0, 1fr) auto auto; gap: 5px; }
  .board-search-input { height: 36px; padding: 0 9px; font-size: 11px; }
  .board-search-btn, .board-reset-btn { min-width: 52px; height: 36px; padding: 0 8px; font-size: 10px; }
  .court-paging { padding: 15px 8px; gap: 5px; }
  .paging-btn { min-width: 30px; height: 30px; padding: 0 8px; font-size: 10px; }
  .paging-summary { font-size: 9px; }
  .court-guide { font-size: 10px; }
  .court-page-footer { margin-top: 16px; padding-top: 16px; }
  .court-footer-action span, .court-footer-home { font-size: 11px; }
  .court-calc-cta { font-size: 13px; }
}
