/* 위치·크기는 GA_LandLedgerPanel.js updateLandLedgerPanelLayout()에서 설정 (툴바 아래·스케일바 위) */

#landLedgerPanel_root {
  position: fixed;
  z-index: 201;
  background: #f5f7fa;
  border: 1px solid #c7d2e3;
  border-radius: 10px;
  /* 헤더/본문 배경이 상단 직각으로 덮이지 않도록 라운드 영역으로 클립 */
  overflow: hidden;
  box-shadow: 4px 0 12px rgba(24, 61, 95, 0.12);
  display: none;
  flex-direction: column;
  font-family: inherit;
  color: #1a1a1a;
}

#landLedgerPanel_root.landLedgerPanel--open {
  display: flex;
}

/* 헤더: 앱 메인 블루(var(--blue1)) + 밝은 텍스트 */
.landLedgerPanel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 16px 14px;
  background: var(--blue1, #1d4ba6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  flex-shrink: 0;
}

.landLedgerPanel__headText {
  padding-right: 8px;
}

.landLedgerPanel__title {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.landLedgerPanel__subtitle {
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
  line-height: 1.4;
}

.landLedgerPanel__close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  flex-shrink: 0;
}

.landLedgerPanel__close:hover {
  color: #fff;
}

/* 본문 */
.landLedgerPanel__body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.landLedgerPanel__scroll {
  flex: 1;
  overflow: auto;
  padding: 12px 14px 20px;
}

/* 안내 배너 */
.landLedgerPanel__notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #92400e;
}

.landLedgerPanel__notice .fa {
  margin-top: 2px;
  color: #d97706;
  flex-shrink: 0;
}

/* 주소 선택 바 */
.landLedgerPanel__addressBar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  cursor: default;
  text-align: left;
  font-size: 13px;
  color: #1e3a5f;
  font-weight: 500;
}

.landLedgerPanel__addressBar .fa-map-marker-alt {
  color: #2563eb;
  flex-shrink: 0;
}

.landLedgerPanel__addressText {
  flex: 1;
  min-width: 0;
  word-break: keep-all;
}

.landLedgerPanel__addressChevron {
  color: #64748b;
  flex-shrink: 0;
}

.landLedgerPanel__pnuSub {
  font-size: 11px;
  color: #8899aa;
  margin: -8px 0 14px 2px;
  word-break: break-all;
}

/* 카드 공통 */
.ll-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 14px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.ll-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 8px;
}

.ll-card__headTitle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.ll-card__headTitle .fa {
  color: #2563eb;
  font-size: 15px;
}

.ll-card__excel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #2563eb;
  text-decoration: none;
  white-space: nowrap;
}

.ll-card__excel:hover {
  text-decoration: underline;
}

/* 카드 헤더 우측 미니 버튼 */
.ll-card__miniBtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.ll-card__miniBtn:hover:not(:disabled) {
  background: #dbeafe;
}

/* 공시지가 차트 모달 */
.llPriceChart__overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.llPriceChart__overlay.llPriceChart__overlay--open {
  display: flex;
}

.llPriceChart__dialog {
  width: min(680px, calc(100vw - 36px));
  max-height: min(520px, calc(100vh - 36px));
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}

.llPriceChart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.llPriceChart__title {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
}

.llPriceChart__close {
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #6b7280;
}

.llPriceChart__close:hover {
  color: #111827;
}

.llPriceChart__body {
  padding: 12px 14px 14px;
  overflow: auto;
}

.llPriceChart__chart {
  width: 100%;
  height: 360px;
}

.llPriceChart__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.llPriceChart__table th,
.llPriceChart__table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eef2f7;
}

.llPriceChart__table th {
  text-align: left;
  color: #6b7280;
  font-weight: 700;
  background: #f8fafc;
  position: sticky;
  top: 0;
}

/* 토지/건축 KV 그리드 */
.ll-kvGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 10px;
}

.ll-kv {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ll-kv__l {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}

.ll-kv__v {
  font-size: 13px;
  color: #111827;
  font-weight: 600;
  word-break: break-all;
}

/* 공시지가 값 + 추세 화살표 */
.ll-kv__v--price {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.ll-priceTrend {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.ll-priceTrend--hide {
  display: none;
}

.ll-priceTrend--up {
  color: #ef4444; /* red */
}

.ll-priceTrend--down {
  color: #2563eb; /* blue */
}

.ll-priceTrend--flat {
  color: #9ca3af; /* gray */
}

/* 링크 아님: 건축물·세대수 등 수치 강조(블루, 굵게, 밑줄 없음) */
.ll-kv__v--emph {
  color: #2563eb;
  font-weight: 600;
  cursor: default;
}

/* 건축물 하단 */
.ll-bldFoot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.ll-bldFoot__date,
.ll-bldFoot__age,
.ll-bldFoot__oldAge {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ll-bldFoot__date,
.ll-bldFoot__age,
.ll-bldFoot__oldAgeLabel {
  color: #1f2937;
}

.ll-bldFoot__oldAgeVal {
  font-weight: 600;
  color: #1f2937;
}

.ll-bldFoot__oldAgeVal--ok {
  color: #2563eb;
}

.ll-bldFoot__oldAgeVal--old {
  color: #dc2626;
}

.ll-bldFoot__sep {
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
}

/* 토지 조회 버튼 */
.ll-landActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

/* 버튼 텍스트 길어도 2열에서 안정적으로 보이게 */
.ll-landActions .ll-btn {
  min-width: 0;
  padding: 10px 10px;
  font-size: 12.5px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ll-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, border-color 0.15s;
}

@media (max-width: 420px) {
  .ll-landActions {
    grid-template-columns: 1fr;
  }
  .ll-landActions .ll-btn {
    white-space: normal;
  }
}

.ll-btn--primary {
  background: #2563eb;
  color: #fff;
}

.ll-btn--primary:hover:not(:disabled) {
  background: #1d4ed8;
}

.ll-btn--outline {
  background: #fff;
  color: #2563eb;
  border: 1px solid #93c5fd;
}

.ll-btn--outline:hover:not(:disabled) {
  background: #eff6ff;
}

.ll-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 건축물 대장: 셀렉트 + 2열 버튼 */
.ll-bldSelect {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
}

.ll-bldRow2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ll-btn--sm {
  padding: 9px 8px;
  font-size: 12px;
}

/* 섹션 타이틀 (카드 밖) */
.ll-sectionLabel {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 8px 2px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.ll-sectionLabel .fa {
  color: #2563eb;
  font-size: 14px;
}

/* 로딩 오버레이 */
.landLedgerPanel__loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(245, 247, 250, 0.94);
  backdrop-filter: blur(2px);
}

.landLedgerPanel__loading.landLedgerPanel__loading--hide {
  display: none;
}

.landLedgerPanel__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: landLedgerPanel-spin 0.75s linear infinite;
}

@keyframes landLedgerPanel-spin {
  to {
    transform: rotate(360deg);
  }
}

.landLedgerPanel__loadingText {
  margin: 0;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.landLedgerPanel__loadingSub {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
}

@media (max-width: 900px) {
  #landLedgerPanel_root.landLedgerPanel--open {
    z-index: 500;
  }
}
