/* =========================
   QUICK RESULT
========================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;

  width: 100%;
  height: 100%;

  overflow: hidden;

  background-color: #f5f5f5;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.quick-result-screen {
  position: relative;

  width: 100%;
  height: 100dvh;
  min-height: 0;

  display: flex;
  flex-direction: column;

  padding-bottom: 0;

  background-color: #ffffff;

  overflow: hidden;
}


/* =========================
   상단 헤더
========================= */

.result-header {
  position: relative;

  height: 58px;
  flex: 0 0 58px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 0 16px;

  border-bottom: 1px solid #eeeeee;

  background-color: #ffffff;

  z-index: 20;
}


/* =========================
   공유 영역 = 실제 스크롤 영역
========================= */

.share-area {
  flex: 1 1 auto;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  padding-bottom: 160px;

  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;

  scrollbar-width: none;
}

.share-area::-webkit-scrollbar {
  display: none;
}



.result-header h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  margin: 0;

  color: #111111;

  font-size: 15px;
  font-weight: 600;

  pointer-events: none;
}


/* =========================
   뒤로가기
========================= */

.back-button {
  width: 40px;
  height: 40px;

  padding: 0;

  border: none;

  background: none;

  color: #111111;

  text-align: left;

  font-size: 28px;

  cursor: pointer;
}


/* =========================
   헤더 오른쪽
========================= */

.header-actions {
  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 10px;

  white-space: nowrap;
}


/* =========================
   공유하기
========================= */

.share-button {
  padding: 0;

  border: none;

  background: none;

  color: #52aead;

  font-size: 12px;
  font-weight: 600;

  white-space: nowrap;

  cursor: pointer;
}


/* =========================
   더보기
========================= */

.more-menu-wrapper {
  position: relative;

  display: flex;

  align-items: center;

  justify-content: center;
}

.more-button {
  width: 28px;
  height: 32px;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 0;

  border: none;

  background: none;

  cursor: pointer;
}

.more-icon {
  width: 20px;
  height: 20px;

  display: block;

  object-fit: contain;
}


/* =========================
   더보기 메뉴
========================= */

.more-menu {
  position: absolute;

  top: 38px;
  right: 0;

  width: 160px;

  padding: 6px;

  border: 1px solid #eeeeee;

  border-radius: 10px;

  background-color: #ffffff;

  box-shadow:
    0 6px 20px
    rgba(0, 0, 0, 0.12);

  overflow: hidden;

  z-index: 100;
}

.more-menu[hidden] {
  display: none;
}

.more-menu-item {
  width: 100%;

  min-height: 40px;

  display: flex;

  align-items: center;

  padding: 0 12px;

  border: none;

  border-radius: 6px;

  background: none;

  color: #333333;

  text-align: left;

  font-size: 12px;
  font-weight: 500;

  white-space: nowrap;

  cursor: pointer;
}

.more-menu-item:hover {
  background-color: #f7f7f7;
}

.more-menu-item.delete {
  color: #e85d5d;
}

.more-menu-divider {
  height: 1px;

  margin: 2px 8px;

  background-color: #eeeeee;
}


/* =========================
   결과 목록
========================= */

.result-list {
  display: flex;
  flex-direction: column;

  gap: 12px;

  padding: 16px;

  /* 여기에는 스크롤/190px padding 필요 없음 */
  overflow: visible;
}

.result-list::-webkit-scrollbar {
  display: none;
}


/* =========================
   결과 카드
========================= */

.result-card {
  overflow: hidden;

  border: 1px solid #dddddd;

  border-radius: 10px;

  background-color: #ffffff;

  transition: 0.2s ease;
}

.result-card.selected {
  border-color: #52aead;
}

.result-card.paid {
  opacity: 0.6;

  background-color: #fafafa;
}


/* =========================
   카드 상단
========================= */

.result-card-header {
  min-height: 72px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 12px;

  padding: 14px 16px;

  cursor: pointer;
}

.result-card-left {
  min-width: 0;

  display: flex;

  align-items: center;

  gap: 12px;
}

.result-profile {
  width: 32px;
  height: 32px;

  flex-shrink: 0;

  border-radius: 50%;

  background-color: #52aead;
}

.result-name-wrap {
  min-width: 0;

  display: flex;

  align-items: center;

  gap: 5px;
}

.result-name {
  color: #222222;

  font-size: 13px;
  font-weight: 600;
}

.me-label {
  color: #777777;

  font-size: 10px;
}


/* =========================
   오른쪽 금액
========================= */

.result-card-right {
  flex-shrink: 0;

  display: flex;

  align-items: center;

  gap: 10px;
}

.result-amount {
  color: #111111;

  font-size: 15px;
  font-weight: 700;

  white-space: nowrap;
}

.detail-toggle {
  color: #111111;

  font-size: 18px;

  transition: transform 0.2s ease;
}

.result-card.open .detail-toggle {
  transform: rotate(180deg);
}


/* =========================
   상세 영역
========================= */

.result-detail {
  display: none;

  padding: 0 16px 14px;
}

.result-card.open .result-detail {
  display: block;
}

.result-detail-divider {
  height: 1px;

  margin-bottom: 12px;

  background-color: #eeeeee;
}


/* =========================
   상세 항목
========================= */

.result-detail-item {
  display: flex;

  align-items: flex-start;

  justify-content: space-between;

  gap: 12px;

  padding: 8px 0;
}

.result-detail-left {
  min-width: 0;

  display: flex;

  flex-direction: column;

  gap: 3px;
}

.result-detail-name {
  color: #333333;

  font-size: 11px;
}

.result-original-amount {
  color: #999999;

  font-size: 9px;
}

.result-detail-amount {
  flex-shrink: 0;

  color: #555555;

  font-size: 11px;
  font-weight: 600;
}


/* =========================
   송금 완료 표시
========================= */

.paid-label {
  margin-top: 8px;

  color: #999999;

  text-align: right;

  font-size: 10px;
}


/* =========================
   하단 버튼 영역
========================= */

.result-bottom-actions {
  position: fixed;

  left: 50%;
  bottom: 14px;

  width: calc(100% - 32px);

  max-width: 358px;

  display: flex;

  flex-direction: column;

  gap: 10px;

  transform: translateX(-50%);

  z-index: 100;

  background-color: #ffffff;
}


/* =========================
   송금완료 버튼
========================= */

.payment-complete-button {
  width: 100%;

  height: 46px;

  border: none;

  border-radius: 7px;

  background-color: #52aead;

  color: #ffffff;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
}

.payment-complete-button:disabled {
  background-color: #cccccc;

  color: #ffffff;

  cursor: default;
}

.payment-complete-button:not(:disabled):active {
  background-color: #459b9a;
}


/* =========================
   항목 추가 / 수정 버튼
========================= */

.edit-items-button {
  width: 100%;

  height: 46px;

  border: 1px solid #52aead;

  border-radius: 7px;

  background-color: #ffffff;

  color: #52aead;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
}

.edit-items-button:active {
  background-color: #f3fbfb;
}


/* =========================
   홈으로 돌아가기
========================= */

.home-link-button {
  align-self: center;

  width: auto;
  height: auto;

  margin-top: 2px;
  padding: 4px 12px;

  border: none;

  background: none;

  color: #aaaaaa;

  font-size: 11px;
  font-weight: 400;

  cursor: pointer;
}

.home-link-button:hover {
  color: #888888;
}

.home-link-button:active {
  color: #666666;
}


/* =========================
   모바일 대응
========================= */

@media (max-width: 390px) {

  .header-actions {
    gap: 8px;
  }

  .result-bottom-actions {
    max-width: calc(100% - 32px);
  }
}