/* 공매 리스트 PC 반응형 — gongmae_list_responsive.css
 * 경매 v2 + land_listcheck.css 와 동일한 Grid 레이아웃 방식 적용
 * 5열 grid: [체크박스 36px] [photo] [body 1fr] [prices] [status]
 */

.rsl-list--gongmae .list-wrapper,
.rsl-list--gongmae .rsl-list__main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .rsl-list--gongmae .rsl-list__thead {
    display: flex !important;
    align-items: center !important;
  }
  .rsl-list--gongmae .rsl-list__thead > .th-check {
    width: 36px !important; min-width: 36px !important; flex-shrink: 0 !important;
  }
  .rsl-list--gongmae .rsl-list__thead > .th-photo {
    width: clamp(110px, 14vw, 220px) !important; min-width: 0 !important; flex-shrink: 0 !important;
  }
  .rsl-list--gongmae .rsl-list__thead > .th-info {
    flex: 1 1 0 !important; width: 0 !important; min-width: 0 !important; overflow: hidden !important;
  }
  .rsl-list--gongmae .rsl-list__thead > .th-price {
    width: clamp(120px, 17vw, 256px) !important; min-width: 0 !important; flex-shrink: 0 !important;
  }
  .rsl-list--gongmae .rsl-list__thead > .th-status {
    width: clamp(130px, 18vw, 268px) !important; min-width: 0 !important; flex-shrink: 0 !important;
  }
}

@media (min-width: 768px) and (max-width: 1025px) {
  .rsl-list--gongmae .rsl-list__thead > .th-photo  { width: clamp(90px, 12vw, 155px) !important; }
  .rsl-list--gongmae .rsl-list__thead > .th-price  { width: clamp(110px, 15vw, 190px) !important; }
  .rsl-list--gongmae .rsl-list__thead > .th-status { width: clamp(120px, 16vw, 200px) !important; }
}

.rsl-list--gongmae .item-address {
  font-size: 16px; line-height: 24px; font-weight: 600; word-break: break-all;
}

@media (min-width: 768px) {
  .rsl-list--gongmae .list-item--molist {
    display: grid !important;
    grid-template-columns:
      36px
      clamp(110px, 14vw, 220px)
      1fr
      clamp(120px, 17vw, 256px)
      clamp(130px, 18vw, 268px) !important;
    grid-template-rows: auto auto auto auto auto;
    column-gap: 0; row-gap: 0;
    align-items: start; min-height: 0 !important;
  }
  .rsl-list--gongmae .land-rowcheck {
    grid-column: 1 !important; grid-row: 1 / 6 !important;
    width: auto !important; min-width: 0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
  }
  .rsl-list--gongmae .list-item--molist > .item-photo {
    grid-column: 2 !important; grid-row: 1 / 6 !important;
    align-self: center !important; width: 100% !important; height: auto !important;
    aspect-ratio: 220 / 160; overflow: hidden; min-width: 0 !important;
  }
  .rsl-list--gongmae .list-item--molist > .item-photo img {
    width: 100%; height: 100%; object-fit: cover; display: block;
  }
  .rsl-list--gongmae .list-item--molist > .item-body          { display: contents !important; }
  .rsl-list--gongmae .list-item--molist > .item-body > .item-body-detail { display: contents !important; }
  .rsl-list--gongmae .list-item--molist > .item-prices        { display: contents !important; }
  .rsl-list--gongmae .list-item--molist > .item-body > .item-body-head {
    grid-row: 1 !important; grid-column: 3 !important;
    display: flex !important; flex-direction: column !important; gap: 2px;
    padding-left: clamp(12px, 1.5vw, 20px) !important; padding-right: 20px; padding-top: 10px;
    align-self: start; min-width: 0; overflow: hidden;
  }
  .rsl-list--gongmae .list-item--molist .item-body-detail > .item-address {
    grid-row: 2 / 4 !important; grid-column: 3 !important;
    padding-left: clamp(12px, 1.5vw, 20px) !important; padding-right: 20px;
    margin: 0; min-height: 48px; min-width: 0;
    display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; text-overflow: ellipsis; word-break: break-all;
  }
  .rsl-list--gongmae .list-item--molist .item-body-detail > .item-spec:not(.item-spec--gongmae-bid) {
    grid-row: 4 !important; grid-column: 3 !important;
    padding-left: clamp(12px, 1.5vw, 20px) !important; padding-right: 20px;
    min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .rsl-list--gongmae .list-item--molist .item-body-detail > .item-spec--gongmae-bid {
    grid-row: 5 !important; grid-column: 3 !important;
    padding-left: clamp(12px, 1.5vw, 20px) !important; padding-right: 20px; padding-bottom: 10px;
    min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .rsl-list--gongmae .list-item--molist .item-body-detail > .special-notes { display: none !important; }
  .rsl-list--gongmae .list-item--molist > .item-prices > .price-row {
    min-height: 0; align-items: center; justify-content: flex-start; gap: 4px;
    line-height: 24px; max-width: none; width: 100%; box-sizing: border-box;
    padding-left: 12px; padding-right: 8px; min-width: 0;
  }
  .rsl-list--gongmae .list-item--molist .price-label {
    flex: 0 0 auto !important; width: auto !important; min-width: 0 !important;
    margin-right: 0 !important; white-space: nowrap;
  }
  .rsl-list--gongmae .list-item--molist .price-value {
    flex: 1 1 0 !important; width: auto !important; min-width: 0 !important; text-align: right !important;
  }
  .rsl-list--gongmae .list-item--molist > .item-prices > .price-row:nth-child(1) {
    grid-row: 2 !important; grid-column: 4 !important; align-self: center;
  }
  .rsl-list--gongmae .list-item--molist > .item-prices > .price-row:nth-child(2) {
    grid-row: 3 !important; grid-column: 4 !important; align-self: center;
  }
  .rsl-list--gongmae .list-item--molist > .item-status {
    grid-column: 5 !important; grid-row: 1 / 6 !important;
    align-self: center !important; min-width: 0 !important;
  }
  /* land_listcheck.css override 차단 */
  .rsl-list--gongmae .list-item--molist > .item-body > .item-body-head { grid-column: 3 !important; }
  .rsl-list--gongmae .list-item--molist .item-body-detail > .item-address { grid-column: 3 !important; }
  .rsl-list--gongmae .list-item--molist .item-body-detail > .item-spec { grid-column: 3 !important; }
  .rsl-list--gongmae .list-item--molist > .item-prices > .price-row:nth-child(1) { grid-column: 4 !important; }
  .rsl-list--gongmae .list-item--molist > .item-prices > .price-row:nth-child(2) { grid-column: 4 !important; }
  .rsl-list--gongmae .list-item--molist > .item-prices > .price-row:nth-child(3) { grid-column: 4 !important; }
  .rsl-list--gongmae .list-item--molist > .item-status { grid-column: 5 !important; }
}

@media (min-width: 768px) and (max-width: 1025px) {
  .rsl-list--gongmae .list-item--molist {
    grid-template-columns:
      36px clamp(80px, 11vw, 140px) 1fr
      clamp(170px, 22vw, 220px) clamp(115px, 15vw, 180px) !important;
  }
  .rsl-list--gongmae .rsl-list__thead > .th-photo  { width: clamp(80px, 11vw, 140px) !important; }
  .rsl-list--gongmae .rsl-list__thead > .th-price  { width: clamp(170px, 22vw, 220px) !important; }
  .rsl-list--gongmae .rsl-list__thead > .th-status { width: clamp(115px, 15vw, 180px) !important; }
  .rsl-list--gongmae .list-item--molist > .item-prices > .price-row {
    padding-left: 4px !important; padding-right: 4px !important;
  }
  .rsl-list--gongmae .rsl-list__thead { padding: 0 8px; }
  .rsl-list--gongmae .item-spec { font-size: clamp(12px, 1.1vw, 14px); }
}

@media (min-width: 768px) and (max-width: 900px) {
  .rsl-list--gongmae .rsl-list__controls--gongmae { flex-wrap: wrap; gap: 6px; }
  .rsl-list--gongmae .th-status .th-status-sub { display: none; }
  .rsl-list--gongmae .status-cell .status-sub { display: none; }
}

@media (max-width: 1024px) {
  .rsl-list--gongmae .rsl-list__header { flex-wrap: wrap !important; }
  .rsl-list--gongmae .rsl-list__viewtoggle { width: 100% !important; order: -1 !important; margin-bottom: 6px !important; }
  .rsl-list--gongmae .rsl-list__toolbar { width: 100% !important; }
}

/* === 공매 Grid: display:contents 외부 CSS specificity 차단 === */
@media (min-width: 768px) {
  .rsl-list--gongmae .list-item--molist > .item-body          { display: contents !important; }
  .rsl-list--gongmae .list-item--molist > .item-body > .item-body-detail { display: contents !important; }
  .rsl-list--gongmae .list-item--molist > .item-prices        { display: contents !important; }
}

/* === 모바일 가격행 — 감정/최저 각 1줄 (2줄 구조) === */
@media (max-width: 767px) {
  .rsl-list--gongmae .list-wrap.rsl-list__mobile .price-row {
    flex-direction: column !important;
    gap: 3px !important;
  }
  .rsl-list--gongmae .list-wrap.rsl-list__mobile .price-line {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    overflow: hidden;
  }
  .rsl-list--gongmae .list-wrap.rsl-list__mobile .price-line .p-val {
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
  }
  .rsl-list--gongmae .list-wrap.rsl-list__mobile .price-line .p-rate {
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: 2px;
  }
}
