/* ============================================
   실시간카드결제 팝업 스타일
   ============================================ */

/* 팝업 오버레이 */
.payment-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100000;
  display: none;
}

.payment-popup-overlay.active {
  display: block;
}

/* 팝업 모달 */
.payment-popup-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 100001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.payment-popup-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* 팝업 컨테이너 */
.payment-popup-container {
  width: 580px;
  max-height: 90vh;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

/* 팝업 헤더 */
.payment-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f2 100%);
  border-bottom: 2px solid #b8d8e8;
  border-radius: 8px 8px 0 0;
}

.payment-popup-title {
  font-size: 14px;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.payment-popup-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #6c757d;
  font-size: 18px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.payment-popup-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #2c3e50;
}

/* 팝업 바디 */
.payment-popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  max-height: 500px;
}

/* 폼 스타일 */
.payment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-form-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
}

.payment-form-label {
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.payment-form-label.required::before {
  content: '○';
  color: #e74c3c;
  font-size: 8px;
  margin-right: 2px;
}

.payment-form-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 입력 필드 */
.payment-input,
.payment-select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 12px;
  color: #2c3e50;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.payment-input:focus,
.payment-select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.payment-input.readonly {
  background: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
}

.payment-select {
  cursor: pointer;
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

/* 체크박스 */
.payment-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #6c757d;
  cursor: pointer;
  margin-top: 4px;
}

.payment-checkbox input[type="checkbox"] {
  width: 14px;
  height: 14px;
  cursor: pointer;
  margin: 0;
}

.payment-checkbox span {
  user-select: none;
}

/* 폼 노트 */
.payment-form-note {
  font-size: 10px;
  color: #95a5a6;
  line-height: 1.5;
  margin-top: 4px;
  padding-left: 2px;
}

/* 예상잔액 섹션 */
.payment-popup-balance {
  padding: 16px 20px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
}

.balance-title {
  font-size: 13px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
}

.balance-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.balance-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.balance-label {
  font-size: 11px;
  color: #6c757d;
  font-weight: 600;
}

.balance-arrow {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3498db;
  font-size: 18px;
}

.balance-value {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
}

.balance-value.current {
  color: #95a5a6;
}

.balance-value.expected {
  color: #3498db;
}

/* 팝업 푸터 */
.payment-popup-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  background: white;
  border-radius: 0 0 8px 8px;
}

.btn-popup-cancel,
.btn-popup-save {
  flex: 1;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-popup-cancel {
  background: #e9ecef;
  color: #495057;
}

.btn-popup-cancel:hover {
  background: #dee2e6;
}

.btn-popup-save {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.btn-popup-save:hover {
  background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

/* 스크롤바 스타일 */
.payment-popup-body::-webkit-scrollbar {
  width: 6px;
}

.payment-popup-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.payment-popup-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.payment-popup-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 반응형 */
@media (max-width: 768px) {
  .payment-popup-container {
    width: 90%;
    max-width: 580px;
  }

  .payment-form-row {
    grid-template-columns: 100px 1fr;
  }
}

/* ============================================
   SMS결제요청 팝업 스타일
   ============================================ */

/* 회원 정보 영역 */
.sms-info-section {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
}

.sms-info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.sms-info-row:last-child {
  margin-bottom: 0;
}

.sms-info-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
}

.sms-info-label {
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
  text-align: left;
}

.sms-info-value {
  font-size: 12px;
  color: #2c3e50;
  padding: 6px 10px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

/* SMS 결제 테이블 */
.sms-payment-table {
  overflow-x: auto;
}

.sms-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #dee2e6;
  background: white;
}

.sms-table thead {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.sms-table th {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
  text-align: center;
  border: 1px solid #dee2e6;
  white-space: nowrap;
}

.sms-table td {
  padding: 12px 8px;
  font-size: 12px;
  color: #2c3e50;
  text-align: center;
  border: 1px solid #dee2e6;
}

.sms-table .text-amount {
  text-align: right;
  padding-right: 12px;
}

.sms-table .text-center {
  text-align: center;
}

/* 금액 스타일 */
.amount-highlight {
  color: #e67e22;
  font-weight: 700;
}

.amount-default {
  color: #2c3e50;
  font-weight: 600;
}

.amount-blue {
  color: #3498db;
  font-weight: 700;
}

/* SMS 요청 버튼 */
.btn-sms-request {
  padding: 6px 16px;
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #2c3e50;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-sms-request:hover {
  background: #f8f9fa;
  border-color: #3498db;
  color: #3498db;
}

/* 닫기 버튼 전용 푸터 */
.payment-popup-footer.single {
  justify-content: flex-end;
}

.btn-popup-close-only {
  padding: 10px 24px;
  background: #6c757d;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-popup-close-only:hover {
  background: #5a6268;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

