/**
 * 결제/신청 팝업 공통 스타일 (program_details / service_details)
 * Bootstrap .row / .col-* 보조 + 팝업 전용 레이아웃
 */

.payment-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.payment-popup-content {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  box-sizing: border-box;
}

.payment-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.payment-popup-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  line-height: 1;
  padding: 0;
}

.payment-popup-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
}

.payment-reservation-details {
  margin-bottom: 20px;
}

.reservation-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.reservation-item.selected {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 10px;
  margin: 5px 0;
}

.payment-summary {
  margin-bottom: 20px;
}

.points-section {
  margin-bottom: 15px;
}

.points-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.points-held {
  font-size: 14px;
  color: #666;
  text-align: right;
}

.total-payment {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 16px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

/* 팝업 내부 그리드: Bootstrap 없이도 깨지지 않도록 */
.payment-popup-content .row {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.payment-popup-content .row > [class*="col-"] {
  box-sizing: border-box;
}

.payment-popup-content .col-3 {
  flex: 0 0 25%;
  max-width: 25%;
  padding-right: 8px;
  word-break: break-word;
}

.payment-popup-content .col-9 {
  flex: 0 0 75%;
  max-width: 75%;
  padding-left: 0;
  word-break: break-word;
}

.payment-methods {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
}

.payment-method-btn {
  flex: 1;
  min-width: 0;
  padding: 2px;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

.payment-method-btn.selected {
  border-color: #00c389;
  border-width: 3px;
  background-color: #fff;
  color: #333;
  box-shadow: 0 0 0 1px #00c389;
}

.payment-method-btn:nth-child(1) {
  background-color: #fff;
  border-color: #ddd;
  color: #333;
}

.payment-method-btn:nth-child(1).selected {
  border-color: #00c389;
  border-width: 3px;
  background-color: #fff;
  color: #333;
  box-shadow: 0 0 0 1px #00c389;
}

.payment-method-btn:nth-child(2) {
  background-color: #fff;
  border-color: #ddd;
  color: #000;
}

.payment-method-btn:nth-child(2).selected {
  border-color: #00c389;
  border-width: 3px;
  background-color: #fff;
  color: #000;
  box-shadow: 0 0 0 1px #00c389;
}

.payment-method-btn:nth-child(3) {
  background-color: #fff;
  border-color: #ddd;
  color: #333;
}

.payment-method-btn:nth-child(3).selected {
  border-color: #00c389;
  border-width: 3px;
  background-color: #fff;
  color: #333;
  box-shadow: 0 0 0 1px #00c389;
}

.payment-method-btn img {
  width: 80px;
  height: 20px;
  object-fit: contain;
}

.payment-agreement {
  margin-bottom: 20px;
}

.agreement-checkbox {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
}

.agreement-checkbox input[type="checkbox"] {
  display: none;
}

.agreement-text {
  flex: 1;
  min-width: 0;
}

.checkmark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
  background-color: #fff;
  top: 2px;
}

.agreement-checkbox input[type="checkbox"]:checked + .checkmark {
  background-color: #00c389;
  border-color: #00c389;
}

.agreement-checkbox input[type="checkbox"]:checked + .checkmark:after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.payment-submit-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, opacity 0.3s;
  background-color: #ccc;
}

.payment-submit-btn.active {
  background-color: #00c389;
  cursor: pointer;
}

.payment-submit-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}
