/* ==================== 청구 수정 팝업 ==================== */

/* 오버레이 */
.charge-edit-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.charge-edit-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* 모달 */
.charge-edit-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 520px;
  max-width: 90%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.charge-edit-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* 컨테이너 */
.charge-edit-container {
  display: flex;
  flex-direction: column;
}

/* 헤더 */
.charge-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
}

.charge-edit-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
}

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

.charge-edit-close-btn:hover {
  color: #2c3e50;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

/* 바디 */
.charge-edit-body {
  padding: 20px;
}

/* 폼 그룹 */
.charge-edit-form-group {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.charge-edit-form-label {
  flex: 0 0 85px;
  font-size: 13px;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
}

.charge-edit-form-label::before {
  content: '○';
  margin-right: 6px;
  font-size: 14px;
}

.charge-edit-form-input-wrapper {
  flex: 1;
}

.charge-edit-form-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  color: #495057;
  transition: all 0.2s;
}

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

.charge-edit-form-input:disabled {
  background: #f8f9fa;
  color: #6c757d;
}

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

/* 예상잔액 섹션 */
.charge-edit-balance-section {
  background: white;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.charge-edit-balance-title {
  margin: 0 0 16px 0;
  font-size: 13px;
  font-weight: 700;
  color: #2c3e50;
}

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

.charge-edit-balance-box {
  flex: 1;
  max-width: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 20px 16px;
}

.charge-edit-balance-amount {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.charge-edit-balance-amount.orange {
  color: #ff8c42;
}

.charge-edit-balance-amount.blue {
  color: #3498db;
}

.charge-edit-balance-label {
  font-size: 12px;
  color: #6c757d;
  font-weight: 600;
  text-align: center;
}

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

/* 푸터 */
.charge-edit-footer {
  padding: 16px 20px;
  border-top: 1px solid #dee2e6;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8f9fa;
}

.btn-charge-edit-confirm,
.btn-charge-edit-cancel {
  min-width: 80px;
  padding: 8px 20px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-charge-edit-confirm {
  background: white;
  color: #2c3e50;
}

.btn-charge-edit-confirm:hover {
  background: #f8f9fa;
  border-color: #3498db;
  color: #3498db;
}

.btn-charge-edit-cancel {
  background: white;
  color: #6c757d;
}

.btn-charge-edit-cancel:hover {
  background: #f8f9fa;
  border-color: #6c757d;
}

/* 반응형 */
@media (max-width: 576px) {
  .charge-edit-modal {
    width: 95%;
  }
  
  .charge-edit-header,
  .charge-edit-body,
  .charge-edit-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .charge-edit-form-label {
    flex: 0 0 75px;
    font-size: 12px;
  }
  
  .charge-edit-balance-display {
    flex-direction: column;
  }
  
  .charge-edit-balance-box {
    width: 100%;
    max-width: 100%;
  }
  
  .charge-edit-balance-arrow {
    transform: rotate(90deg);
  }
}
